|
|
|
|
@ -216,7 +216,7 @@ packet_factory::packet_factory(std::string pw)
|
|
|
|
|
ABORT(); |
|
|
|
|
pw.resize(std::min<std::size_t>(pw.size(), crypto_pwhash_argon2id_PASSWD_MAX)); |
|
|
|
|
pw.resize(std::max<std::size_t>(pw.size(), crypto_pwhash_argon2id_PASSWD_MIN), 0); |
|
|
|
|
std::string salt("devilution-salt 0.2.0"); |
|
|
|
|
std::string salt("devilution-salt 1.1.0"); |
|
|
|
|
salt.resize(crypto_pwhash_argon2id_SALTBYTES, 0); |
|
|
|
|
if (crypto_pwhash(key.data(), crypto_secretbox_KEYBYTES, |
|
|
|
|
pw.data(), pw.size(), |
|
|
|
|
|