PKCS5_pbe2_set_iv

Build a PKCS#5 PBES2 AlgorithmIdentifier for cipher with optional IV and PBKDF2 PRF.

Synopsis

Declared in <openssl/x509.h>

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

Return Value

Newly allocated X509_ALGOR, or NULL on error.

Parameters

NameDescription
cipherCipher that defines the encryption scheme.
iterPBKDF2 iteration count.
saltSalt bytes, or NULL as implemented.
saltlenLength of salt in bytes.
aivExplicit IV bytes, or NULL to generate one.
prf_nidNID of the PBKDF2 PRF, or 0 for the default.