Is there any C API in openssl to derive a key from given string -


i need c api in openssl library deriving key given string. can sample source code this?

a standard algorithm pbkdf2 (an acronym password-based key derivation function version 2). there implementation of pbkdf2 in openssl, declared in openssl/evp.h:

int pkcs5_pbkdf2_hmac_sha1(const char *pass, int passlen,                            unsigned char *salt, int saltlen, int iter,                            int keylen, unsigned char *out); 

when generating new key should use rand_bytes() openssl/rand.h create salt. iter iteration count, should large intended application can tolerate - @ least 20,000.


Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -