Pyrogenesis  trunk
pkcs5_pbkdf2.h File Reference
#include <sodium.h>
Include dependency graph for pkcs5_pbkdf2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int pbkdf2 (unsigned char(&output)[crypto_hash_sha256_BYTES], 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...

Function Documentation

◆ pbkdf2()

int pbkdf2 ( unsigned char(&)  output[crypto_hash_sha256_BYTES],
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.

outputThe output buffer for the digested hash
keyThe initial key we want to hash
key_lenLength of the key in bytes
saltThe salt we use to iteratively hash the key.
salt_lenLength of the salt in bytes
iterationsNumber of salting iterations
0 on success, -1 on error