Initialize a cipher context for password‐based encryption from a PBE OID and parameters.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PBE_CipherInit(
    ASN1_OBJECT* pbe_obj,
    char const* pass,
    int passlen,
    ASN1_TYPE* param,
    EVP_CIPHER_CTX* ctx,
    int en_de);

Description

Equivalent to EVP_PBE_CipherInit_ex() with a NULL library context and property query.

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

pbe_obj

OID identifying the PBE algorithm.

pass

Password bytes.

passlen

Length of pass in bytes, or ‐1 if pass is NUL‐terminated.

param

Algorithm parameters associated with pbe_obj.

ctx

Cipher context to initialize.

en_de

1 to encrypt, or 0 to decrypt.

Created with MrDocs