PKCS5_PBE_keyivgen_ex

Derive a key and IV for password-based encryption and initialize cctx (library-context variant).

Synopsis

Declared in <openssl/evp.h>

int
PKCS5_PBE_keyivgen_ex(
    EVP_CIPHER_CTX* cctx,
    char const* pass,
    int passlen,
    ASN1_TYPE* param,
    EVP_CIPHER const* cipher,
    EVP_MD const* md,
    int en_de,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
cctxCipher context to initialize with the derived key and IV.
passPassword bytes, or NULL.
passlenLength of pass 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.
libctxLibrary context for provider-aware derivation, or NULL for the default.
propqProperty query string, or NULL.