23 #include <sys/types.h>
25 #include <openssl/evp.h>
26 #include <openssl/rand.h>
38 #define PBKDF2_ITERATIONS 2048
75 const char * password,
76 const size_t npassword,
78 unsigned char ** salt)
82 if (0 > RAND_pseudo_bytes(*salt,
SALT_SIZE)) {
88 if (0 == PKCS5_PBKDF2_HMAC(
#define PBKDF2_ITERATIONS
void * memCalloc(size_t, size_t)
int hash_pw(const char *password, const size_t npassword, unsigned char *hash, unsigned char **salt)