Derive a PBE key and IV and initialize ctx for encryption/decryption (PKCS #5 v1.5).
Declared in <openssl/evp.h>
int
PKCS5_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. |
| pass | Password octets (may be NULL if passlen is 0). |
| passlen | Password length in bytes, or -1 to use strlen(pass). |
| param | ASN.1 PBE parameters (salt, iteration count, and related fields). |
| cipher | Cipher algorithm used for PBE. |
| md | Digest used by the PBE key derivation. |
| en_de | 1 to encrypt, or 0 to decrypt. |