Go to the source code of this file.
|
int | pbkdf2 (unsigned char(&output)[SHA_DIGEST_SIZE], const unsigned char *key, size_t key_len, const unsigned char *salt, size_t salt_len, unsigned iterations) |
| Simple PBKDF2 implementation for hard to crack passwords. More...
|
|
int pbkdf2 |
( |
unsigned char(&) |
output[SHA_DIGEST_SIZE], |
|
|
const unsigned char * |
key, |
|
|
size_t |
key_len, |
|
|
const unsigned char * |
salt, |
|
|
size_t |
salt_len, |
|
|
unsigned |
iterations |
|
) |
| |
Simple PBKDF2 implementation for hard to crack passwords.
- Parameters
-
output | The output buffer for the digested hash |
key | The initial key we want to hash |
key_len | Length of the key in bytes |
salt | The salt we use to iteratively hash the key. |
salt_len | Length of the salt in bytes |
iterations | Number of salting iterations |
- Returns
- 0 on success, -1 on error