PKCS5_pbe2_set_iv_ex

Build a PBES2 AlgorithmIdentifier with explicit IV and library context.

Synopsis

Declared in <openssl/x509.h>

X509_ALGOR*
PKCS5_pbe2_set_iv_ex(
    EVP_CIPHER const* cipher,
    int iter,
    unsigned char* salt,
    int saltlen,
    unsigned char* aiv,
    int prf_nid,
    OSSL_LIB_CTX* libctx);

Return Value

New X509_ALGOR encoding PBES2 parameters, or NULL on error.

Parameters

NameDescription
cipherContent-encryption cipher for the PBES2 encryption scheme.
iterPBKDF2 iteration count; <=0 selects the default.
saltOptional salt bytes; NULL generates a random salt of saltlen.
saltlenSalt length in bytes when salt is NULL / length of salt.
aivOptional IV bytes for cipher; NULL generates a random IV.
prf_nidPBKDF2 PRF NID (for example NID_hmacWithSHA256), or -1 for the default.
libctxLibrary context for random/algorithm fetches, or NULL for the default.