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

Name

Description

iter

PBKDF2 iteration count.

salt

Salt octets; may be NULL to generate a random salt of saltlen.

saltlen

Salt length in bytes.

prf_nid

NID of the PRF digest (for example NID_hmacWithSHA256); <= 0 selects the default.

keylen

Derived key length in bytes to encode in the parameters; <= 0 omits it.

libctx

Library context used for any random salt generation; NULL uses the default.

Created with MrDocs