Browse Source

drop redundant sodium_init() call

It is done in crypto.c

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
pull/1381/head
Syrone Wong 7 years ago
committed by Max Lv
parent
commit
b74108db09
1 changed files with 0 additions and 5 deletions
  1. 5
      src/aead.c

5
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;

Loading…
Cancel
Save