Derive a key and IV from a PKCS#5 v2 PBE AlgorithmIdentifier and initialize ctx.
Declared in <openssl/evp.h>
int
PKCS5_v2_PBE_keyivgen(
EVP_CIPHER_CTX* ctx,
char const* pass,
int passlen,
ASN1_TYPE* param,
EVP_CIPHER const* cipher,
EVP_MD const* md,
int en_de);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| ctx | Cipher context to initialize for encryption or decryption. |
| pass | Password bytes. |
| passlen | Length of pass, or -1 if pass is a NUL-terminated string. |
| param | ASN.1 parameters from the PBE AlgorithmIdentifier. |
| cipher | Cipher suggested by the caller (may be overridden by param). |
| md | Digest suggested by the caller (may be overridden by param). |
| en_de | Non-zero to encrypt, zero to decrypt. |