Decrypt a CMS EncryptedData ContentInfo with a symmetric key.

Synopsis

Declared in <openssl/cms.h>

int
CMS_EncryptedData_decrypt(
    CMS_ContentInfo* cms,
    unsigned char const* key,
    size_t keylen,
    BIO* dcont,
    BIO* out,
    unsigned int flags);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

cms

EncryptedData ContentInfo to decrypt (AEAD ciphers are not supported).

key

Symmetric decryption key bytes.

keylen

Length of key in bytes.

dcont

Detached encrypted‐content BIO, or NULL when content is embedded.

out

BIO that receives the decrypted plaintext.

flags

Optional CMS flags (for example CMS_TEXT).

Created with MrDocs