EVP_PBE_CipherInit_ex

Initialize a cipher context for password-based encryption using a library context.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PBE_CipherInit_ex(
    ASN1_OBJECT* pbe_obj,
    char const* pass,
    int passlen,
    ASN1_TYPE* param,
    EVP_CIPHER_CTX* ctx,
    int en_de,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
pbe_objOID identifying the PBE algorithm.
passPassword bytes.
passlenLength of pass in bytes, or -1 if pass is NUL-terminated.
paramAlgorithm parameters associated with pbe_obj.
ctxCipher context to initialize.
en_de1 to encrypt, or 0 to decrypt.
libctxLibrary context for fetching algorithms, or NULL for the default.
propqProperty query string, or NULL.