pbkdf2(3)
limb manual
pbkdf2(3)
NAME
pbkdf2 - derive a key from given password & salt using PBKDF2
SYNOPSIS
#include <limb/pbkdf2.h>
int pbkdf2(char *dst, size_t dlen, hasher *hr, const char *pwd, size_t plen,
const char *salt, size_t slen, size_t iter)
DESCRIPTION
The pbkdf2() function derives a key of dlen bytes from the given password
of length plen bytes and salt of length slen bytes, through iter
iterations, using the HMAC based on the cryptographioc hasher hr, and writing
it into dst, as described in RFC 8018.
For a list of available hashers, refer to hasher_hash(3).
RETURN VALUE
The pbkdf2() function returns 1 on success. Otherwise it returns 0, which can
only happen if dlen is too large, i.e. greater than 2^32 - 1.