#include <EncryptedContentInfo.h>
TSP-enforcing: Yes
Definition at line 26 of file EncryptedContentInfo.h.
Public Member Functions | |
CPKIFEncryptedContentInfo () | |
virtual | ~CPKIFEncryptedContentInfo () |
void | SetOID (CPKIFOIDPtr &oid) |
CPKIFOIDPtr | GetOID () const |
void | SetContent (CPKIFBufferPtr &buf) |
CPKIFBufferPtr | GetContent () const |
void | SetAlgorithmIdentifier (CPKIFAlgorithmIdentifierPtr &algID) |
CPKIFAlgorithmIdentifierPtr | GetAlgorithmIdentifier () |
CPKIFEncryptedContentInfo::CPKIFEncryptedContentInfo | ( | ) |
Interface: External
This function creates an instance of CPKIFEncryptedContentInfo and initializes the value of the OID property of a CPKIFEncryptedContentInfo object to g_data.
Definition at line 34 of file EncryptedContentInfo.cpp.
References g_data.
CPKIFEncryptedContentInfo::~CPKIFEncryptedContentInfo | ( | ) | [virtual] |
Interface: External
This function destroys an instance of CPKIFEncryptedContentInfo.
Definition at line 46 of file EncryptedContentInfo.cpp.
void CPKIFEncryptedContentInfo::SetOID | ( | CPKIFOIDPtr & | oid | ) |
Interface: External
This function is used to specify the object OID value that identifies the type of payload encapsulated by the content info structure. PKIF provides variables that define the common CMS-related OIDs, such as g_data. By default, the value of this property is set to g_data. If SetOID is invoked with the oid parameter containing a NULL pointer, a CPKIFMessageException with error code set to COMMON_INVALID_INPUT will be thrown.
CPKIFMessageException(COMMON_INVALID_INPUT) |
oid | [in] Reference to a smart pointer to a CPKIFOID object containing the OID value identifying the content passed to SetContent |
Definition at line 63 of file EncryptedContentInfo.cpp.
References COMMON_INVALID_INPUT, and TOOLKIT_MESSAGE.
CPKIFOIDPtr CPKIFEncryptedContentInfo::GetOID | ( | ) | const |
Interface: External
The GetOID function returns a smart pointer to a CPKIFOID object containing the value of the OID property. The value will point to the OID value passed by the application to SetOID or the value retrieved from a decoded EnvelopedData or EncryptedData message. If no value has been specified by the application or retrieved from a decoded EnvelopedData or EncryptedData message, the value returned will contain a NULL pointer.
Definition at line 84 of file EncryptedContentInfo.cpp.
void CPKIFEncryptedContentInfo::SetContent | ( | CPKIFBufferPtr & | buf | ) |
Interface: External
This function is used to set the content included in an EncryptedContentInfo structure within a CMS message. To specify the type of the content, use the SetOID function.
CPKIFMessageException(COMMON_INVALID_INPUT) |
buf | [in] Reference to smart pointer to a CPKIFBuffer object containing the buffer to be encrypted and encapsulated in an EncryptedData or EnvelopedData message. |
Definition at line 98 of file EncryptedContentInfo.cpp.
References COMMON_INVALID_INPUT, and TOOLKIT_MESSAGE.
CPKIFBufferPtr CPKIFEncryptedContentInfo::GetContent | ( | ) | const |
Interface: External
This function is used to get the content included in an EncryptedContentInfo structure within a CMS message. To retrieve the type of the content, use the GetOID function.
The GetContent function returns a smart pointer to a CPKIFBuffer object containing the value of the Content property. The value will point to the content passed by the application to SetContent or the value retrieved from a decoded and decrypted EnvelopedData or EncryptedData message. If no value has been specified by the application or retrieved from a decoded EnvelopedData or EncryptedData message, the value returned will contain a NULL pointer.
Definition at line 123 of file EncryptedContentInfo.cpp.
void CPKIFEncryptedContentInfo::SetAlgorithmIdentifier | ( | CPKIFAlgorithmIdentifierPtr & | algID | ) |
Interface: External
This function is used to set the algorithm identifier that identifies the algorithm with which the payload specified by a call to SetContent should be encrypted. If SetAlgorithmIdentifier is invoked with the algID parameter containing a NULL pointer, a CPKIFMessageException with error code set to COMMON_INVALID_INPUT will be thrown. Currently only Triple DES CBC, which can be specified using the g_tdesCBC global variable,is supported.
The SetAlgorithmIdentifier function only sets the value of the AlgorithmIdentifier property of a CPKIFEncryptedContentInfo object. It does not indicate how the associated payload will be encrypted. The encryption algorithm is established by calling SetAlgorithmAndMode function on a CPKIFEnvelopedData object or by specifying the algorithm and mode on a CPKIFKeyMaterial object passed to a CPKIFEnvelopedData object
CPKIFMessageException(COMMON_INVALID_INPUT) |
algID | [in] Reference to a smart pointer to a CPKIFAlgorithmIdentifier object containing the algorithm identifier value to use when encrypting the associated content |
Definition at line 145 of file EncryptedContentInfo.cpp.
References COMMON_INVALID_INPUT, and TOOLKIT_MESSAGE.
CPKIFAlgorithmIdentifierPtr CPKIFEncryptedContentInfo::GetAlgorithmIdentifier | ( | ) |
Interface: External
The GetAlgorithmIdentifier function returns a smart pointer to a CPKIFAlgorithmIdentifier object containing either the algorithm identifier specified by calling SetAlgorithmIdentifier or the value parsed from an encoded EncryptedContentInfo object.
Definition at line 165 of file EncryptedContentInfo.cpp.