PKCS5_pbkdf2_set_ex

Build an X509_ALGOR describing PBKDF2 parameters (library-context aware).

Synopsis

Declared in <openssl/x509.h>

X509_ALGOR*
PKCS5_pbkdf2_set_ex(
    int iter,
    unsigned char* salt,
    int saltlen,
    int prf_nid,
    int keylen,
    OSSL_LIB_CTX* libctx);

Return Value

New X509_ALGOR on success, or NULL on failure.

Parameters

NameDescription
iterPBKDF2 iteration count.
saltSalt octets; may be NULL to generate a random salt of saltlen.
saltlenSalt length in bytes.
prf_nidNID of the PRF digest (for example NID_hmacWithSHA256); <= 0 selects the default.
keylenDerived key length in bytes to encode in the parameters; <= 0 omits it.
libctxLibrary context used for any random salt generation; NULL uses the default.