1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00
This commit is contained in:
Frank Denis 2017-09-25 16:33:30 +02:00
parent 70a841e649
commit 491f785274

View File

@ -27,7 +27,7 @@ pickparams(unsigned long long opslimit, const size_t memlimit,
} }
*r = 8; *r = 8;
if (opslimit < memlimit / 32) { if (opslimit < memlimit / 32) {
*p = 1; *p = 1;
maxN = opslimit / (*r * 4); maxN = opslimit / (*r * 4);
for (*N_log2 = 1; *N_log2 < 63; *N_log2 += 1) { for (*N_log2 = 1; *N_log2 < 63; *N_log2 += 1) {
if ((uint64_t)(1) << *N_log2 > maxN / 2) { if ((uint64_t)(1) << *N_log2 > maxN / 2) {