26 const std::vector<uint8_t> &salt,
const ScryptParam ¶m)
32 std::vector<uint8_t> out;
33 out.resize(param.
len);
35 int ret = libscrypt_scrypt(in.data(), in.size(), salt.data(), salt.size(),
36 param.
N, param.
r, param.
p, out.data(), out.size());
38 throw std::runtime_error(
"FAILED TO SCRYPT");
51 auto out =
Hash(in, expected.
salt, expected.
p);
52 return out.hash == expected.
hash;