PKCS5_PBE_keyivgen

Derive a PBE key and IV and initialize ctx for encryption/decryption (PKCS #5 v1.5).

Synopsis

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);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context to initialize.
passPassword octets (may be NULL if passlen is 0).
passlenPassword length in bytes, or -1 to use strlen(pass).
paramASN.1 PBE parameters (salt, iteration count, and related fields).
cipherCipher algorithm used for PBE.
mdDigest used by the PBE key derivation.
en_de1 to encrypt, or 0 to decrypt.