From b74108db090895ab58f32fe14e72bcfffac5518c Mon Sep 17 00:00:00 2001 From: Syrone Wong Date: Sun, 19 Mar 2017 16:59:14 +0800 Subject: [PATCH] drop redundant sodium_init() call It is done in crypto.c Signed-off-by: Syrone Wong --- src/aead.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/aead.c b/src/aead.c index d49b349d..29c64c1d 100644 --- a/src/aead.c +++ b/src/aead.c @@ -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;