PKCS12_PBE_keyivgen_ex

Initialise a cipher context for PKCS#12 PBE encryption or decryption.

Synopsis

Declared in <openssl/pkcs12.h>

int
PKCS12_PBE_keyivgen_ex(
    EVP_CIPHER_CTX* ctx,
    char const* pass,
    int passlen,
    ASN1_TYPE* param,
    EVP_CIPHER const* cipher,
    EVP_MD const* md_type,
    int en_de,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, 0 on error.

Parameters

NameDescription
ctxCipher context to initialise.
passPassphrase (treated as a byte sequence).
passlenLength of pass, or -1 to use strlen().
paramPBE algorithm parameters.
cipherCipher for the operation.
md_typeMessage digest for key derivation.
en_de1 to encrypt, 0 to decrypt.
libctxLibrary context for algorithm fetching, or NULL for default.
propqProperty query for algorithm fetching, or NULL.