drop redundant sodium_init() call

It is done in crypto.c

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
Syrone Wong
2017-03-19 17:16:19 +08:00
committed by Max Lv
parent cfe830405f
commit b74108db09
-5
View File
@@ -693,11 +693,6 @@ aead_key_init(int method, const char *pass, const char *key)
cipher_t *cipher = (cipher_t *)ss_malloc(sizeof(cipher_t));
memset(cipher, 0, sizeof(cipher_t));
// Initialize sodium for random generator
if (sodium_init() == -1) {
FATAL("Failed to initialize sodium");
}
if (method >= CHACHA20POLY1305IETF) {
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t));
cipher->info = cipher_info;