rbnacl
rbnacl copied to clipboard
Use libsodium constants for scrypt params
This pull request adds two libsodium constants OPSLIMIT_SENSITIVE
and MEMLIMIT_SENSITIVE
as default values for the opslimit
and memlimit
parameters to RbNaCl::PasswordHash.scrypt
.
Here is an example of these values being used in the wild: https://github.com/jedisct1/minisign/blob/573988d2355172b6e050fa3fdc974abd3e476988/src/minisign.c#L357-L358
Also for the test case, I updated the expected digest so that there wouldn't be two scrypt_digest
s.