5 CMS_EncryptedData_decrypt
6 - Decrypt CMS EncryptedData
10 #include <openssl/cms.h>
12 int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
13 const unsigned char *key, size_t keylen,
14 BIO *dcont, BIO *out, unsigned int flags);
18 CMS_EncryptedData_decrypt() decrypts a I<cms> EncryptedData object using the
19 symmetric I<key> of size I<keylen> bytes. I<out> is a BIO to write the content
20 to and I<flags> is an optional set of flags.
21 I<dcont> is used in the rare case where the encrypted content is detached. It
22 will normally be set to NULL.
24 The following flags can be passed in the B<flags> parameter.
26 If the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted
27 from the content. If the content is not of type B<text/plain> then an error is
32 CMS_EncryptedData_decrypt() returns 0 if an error occurred otherwise it
37 L<ERR_get_error(3)>, L<CMS_EncryptedData_encrypt(3)>
42 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
44 Licensed under the Apache License 2.0 (the "License"). You may not use
45 this file except in compliance with the License. You can obtain a copy
46 in the file LICENSE in the source distribution or at
47 L<https://www.openssl.org/source/license.html>.