git-svn-id: svn://db.shs.com.ru/pip@612 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -359,6 +359,7 @@ PIByteArray PICrypt::decrypt(const PIByteArray & crypt_data, const PIByteArray &
|
|||||||
|
|
||||||
|
|
||||||
PIByteArray PICrypt::passwordHash(const PIString & password, const PIByteArray & seed) {
|
PIByteArray PICrypt::passwordHash(const PIString & password, const PIByteArray & seed) {
|
||||||
|
#ifdef crypto_pwhash_ALG_ARGON2I13
|
||||||
// char out[crypto_pwhash_STRBYTES];
|
// char out[crypto_pwhash_STRBYTES];
|
||||||
PIByteArray pass = password.toUTF8();
|
PIByteArray pass = password.toUTF8();
|
||||||
PIByteArray n;
|
PIByteArray n;
|
||||||
@@ -374,6 +375,9 @@ PIByteArray PICrypt::passwordHash(const PIString & password, const PIByteArray &
|
|||||||
PIByteArray ret;
|
PIByteArray ret;
|
||||||
ret << ph << n << crypto_pwhash_argon2i_opslimit_moderate() << crypto_pwhash_argon2i_memlimit_moderate();
|
ret << ph << n << crypto_pwhash_argon2i_opslimit_moderate() << crypto_pwhash_argon2i_memlimit_moderate();
|
||||||
return ret;
|
return ret;
|
||||||
|
#else
|
||||||
|
return PIByteArray();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user