diff options
author | George Hazan <george.hazan@gmail.com> | 2024-06-21 14:29:17 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-06-21 14:29:17 +0300 |
commit | 46ea86584a9787c8b9dc3983cf23d9b5b93b5841 (patch) | |
tree | fbaf3793ae2170f7982f08a62c028a23cd9afedd /libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c | |
parent | 82e75be329dd0f30c0281ef9c3c08488b89d109f (diff) |
fixes #4477 (libsodium: update to 1.0.20)
Diffstat (limited to 'libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c')
-rw-r--r-- | libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c index 9b81377ad4..eea04da8cb 100644 --- a/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +++ b/libs/libsodium/src/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c @@ -24,6 +24,7 @@ #include "crypto_pwhash_scryptsalsa208sha256.h"
#include "crypto_scrypt.h"
#include "private/common.h"
+#include "randombytes.h"
#include "runtime.h"
#include "utils.h"
@@ -150,6 +151,10 @@ escrypt_r(escrypt_local_t *local, const uint8_t *passwd, size_t passwdlen, uint32_t r;
uint32_t p;
+ if (buf != NULL) {
+ randombytes_buf(buf, buflen);
+ }
+
src = escrypt_parse_setting(setting, &N_log2, &r, &p);
if (!src) {
return NULL;
|