Build a PBES2 AlgorithmIdentifier with explicit IV and library context.
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);
New X509_ALGOR encoding PBES2 parameters, or NULL on error.
| Name | Description |
|---|---|
| cipher | Content-encryption cipher for the PBES2 encryption scheme. |
| iter | PBKDF2 iteration count; <=0 selects the default. |
| salt | Optional salt bytes; NULL generates a random salt of saltlen. |
| saltlen | Salt length in bytes when salt is NULL / length of salt. |
| aiv | Optional IV bytes for cipher; NULL generates a random IV. |
| prf_nid | PBKDF2 PRF NID (for example NID_hmacWithSHA256), or -1 for the default. |
| libctx | Library context for random/algorithm fetches, or NULL for the default. |