0
0
0142017-07-26 10:00:22
Python
014, 2017-07-26 10:00:22

Why is there an error when calling the hashlib.scrypt function?

I am using python 3.6. hashlib module, hashlib.scrypt function. If you specify the number of iterations
in the parameter n more than 16384 , for example 32768 , then it gives an error:


ValueError: Invalid paramemter combination for n, r, p, maxmem.

Function call:
hashlib.scrypt(b'pass', salt=salt_bin, n=32768, r=8, p=1, dklen=32).hex()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ildar Gafarov, 2019-07-16
@badprogrammist

N must be a power of two (Source https://blog.filippo.io/the-scrypt-parameters/)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question