From c3e32587884be246528e74e30ef017159a5eb3fc Mon Sep 17 00:00:00 2001 From: dubslow Date: Thu, 4 Sep 2014 06:16:22 -0500 Subject: Update tox.c --- toxcore/tox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxcore/tox.c b/toxcore/tox.c index 600eafa6..c3199fef 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -898,7 +898,7 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3 { /* out of memory most likely */ return -1; } - randombytes_buf(passphrase, pplength); /* wipe plaintext pw */ + sodium_memzero(passphrase, pplength); /* wipe plaintext pw */ /* next get plain save data */ uint32_t temp_size = tox_size(tox); @@ -958,7 +958,7 @@ int tox_encrypted_load(Tox *tox, const uint8_t *data, uint32_t length, uint8_t * { /* out of memory most likely */ return -1; } - randombytes_buf(passphrase, pplength); /* wipe plaintext pw */ + sodium_memzero(passphrase, pplength); /* wipe plaintext pw */ /* decrypt the data */ uint8_t temp_data[decrypt_length]; -- cgit v1.2.3