1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00
This commit is contained in:
Frank Denis 2017-08-08 14:28:12 +02:00
parent 1c573d4cb4
commit dd9416fd59

View File

@ -94,6 +94,10 @@ size_t crypto_pwhash_opslimit_sensitive(void);
SODIUM_EXPORT
size_t crypto_pwhash_memlimit_sensitive(void);
/*
* With this function, do not forget to store all parameters, including the
* algorithm identifier in order to produce deterministic output.
*/
SODIUM_EXPORT
int crypto_pwhash(unsigned char * const out, unsigned long long outlen,
const char * const passwd, unsigned long long passwdlen,
@ -101,6 +105,11 @@ int crypto_pwhash(unsigned char * const out, unsigned long long outlen,
unsigned long long opslimit, size_t memlimit, int alg)
__attribute__ ((warn_unused_result));
/*
* The output string already includes all the required parameters, including
* the algorithm identifier. The string is all that has to be stored in
* order to verify a password.
*/
SODIUM_EXPORT
int crypto_pwhash_str(char out[crypto_pwhash_STRBYTES],
const char * const passwd, unsigned long long passwdlen,