2017-05-30 19:58:03 +08:00
|
|
|
#include "nitrox_common.h"
|
2018-11-21 15:36:58 +08:00
|
|
|
|
2018-12-14 19:19:51 +08:00
|
|
|
int nitrox_crypto_register(void)
|
2018-11-21 15:36:58 +08:00
|
|
|
{
|
2018-12-14 19:19:51 +08:00
|
|
|
int err;
|
2018-11-21 15:36:58 +08:00
|
|
|
|
2018-12-14 19:19:51 +08:00
|
|
|
err = nitrox_register_skciphers();
|
|
|
|
if (err)
|
|
|
|
return err;
|
2018-11-21 15:36:58 +08:00
|
|
|
|
2018-12-14 19:19:51 +08:00
|
|
|
err = nitrox_register_aeads();
|
2017-05-30 19:58:03 +08:00
|
|
|
if (err) {
|
2018-12-14 19:19:51 +08:00
|
|
|
nitrox_unregister_skciphers();
|
|
|
|
return err;
|
2017-05-30 19:58:03 +08:00
|
|
|
}
|
|
|
|
|
2018-12-14 19:19:51 +08:00
|
|
|
return 0;
|
2017-05-30 19:58:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void nitrox_crypto_unregister(void)
|
|
|
|
{
|
2018-12-14 19:19:51 +08:00
|
|
|
nitrox_unregister_aeads();
|
|
|
|
nitrox_unregister_skciphers();
|
2017-05-30 19:58:03 +08:00
|
|
|
}
|