manpagez: man pages & more
man CMS_EncryptedData_set1_key(3)
Home | html | info | man
CMS_ENCRYPTEDDATA_SET1_KEY(3ossl)   OpenSSL  CMS_ENCRYPTEDDATA_SET1_KEY(3ossl)



NAME

       CMS_EncryptedData_set1_key - Sets the cipher and key for CMS
       EncryptedData


SYNOPSIS

        #include <openssl/cms.h>

        int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
                                       const unsigned char *key, size_t keylen);


DESCRIPTION

       CMS_EncryptedData_set1_key(3) takes in a cms EncryptedData object and
       sets the appropriate attributes to ciph, it makes a copy of the
       symmetric key of size keylen. AEAD cipher algorithms are not supported.


RETURN VALUES

       CMS_EncryptedData_set1_key(3) returns 0 if an error occurred otherwise
       returns 1.


SEE ALSO

       CMS_EncryptedData_encrypt(3), CMS_EncryptedData_decrypt(3)


COPYRIGHT

       Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.

       Licensed under the Apache License 2.0 (the "License").  You may not use
       this file except in compliance with the License.  You can obtain a copy
       in the file LICENSE in the source distribution or at
       <https://www.openssl.org/source/license.html>.

3.6.2                             2026-04-07 CMS_ENCRYPTEDDATA_SET1_KEY(3ossl)

openssl 3.6.2 - Generated Sun Apr 12 16:09:33 CDT 2026
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.