Pyrogenesis trunk
|
Functions | |
static void | hmac_sha256 (unsigned char(&digest)[crypto_hash_sha256_BYTES], const unsigned char *text, size_t text_len, const unsigned char *key, size_t key_len) |
Copyright (c) 2008 Damien Bergamini damie.nosp@m.n.be.nosp@m.rgami.nosp@m.ni@f.nosp@m.ree.f.nosp@m.r More... | |
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 rounds) |
Simple PBKDF2 implementation for hard to crack passwords. More... | |
|
static |
Copyright (c) 2008 Damien Bergamini damie.nosp@m.n.be.nosp@m.rgami.nosp@m.ni@f.nosp@m.ree.f.nosp@m.r
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
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.
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 |