CRYPT_DECRYPT_MESSAGE_PARA

The CRYPT_DECRYPT_MESSAGE_PARA structures are used for decrypting messages.

typedef struct _ CRYPT_DECRYPT_MESSAGE_PARA {
    DWORD                       cbSize;
    DWORD                       dwMsgAndCertEncodingType;
    DWORD                       cCertStore;
    HCERTSTORE*                 rghCertStore;
} CRYPT_DECRYPT_MESSAGE_PARA,  *PCRYPT_DECRYPT_MESSAGE_PARA;
 

Members

cbSize
Must be set to the size of this data structure.
dwMsgAndCertEncodingType
The type of encoding used. Note that both a certificate and message encoding type is required to be specified by combining them with a bitwise OR operation as shown in the following example:
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING
 

Currently defined encoding types are shown in the following table.
Encoding type Value
X509_ASN_ENCODING 0x00000001
PKCS_7_ASN_ENCODING 0x00010000

cCertStore
The number of elements in the array rghCertStore.
rghCertStore
An array of certificate store handles.

These certificate store handles are used to obtain the certificate context to use for decrypting a message. See the decryption functions CryptDecryptMessage, and CryptDecryptAndVerifyMessageSignature. An encrypted message can have one or more recipients. The recipients are identified by their certificate ID (certificate issuer and serial number). The certificate stores are searched to find the certificate context corresponding to the certificate ID.

Only certificate contexts in the store with one of the following properties, CERT_KEY_PROV_INFO_PROP_ID, or CERT_KEY_CONTEXT_PROP_ID can be used. These properties specify the private exchange key to use.

See Also

CryptDecryptAndVerifyMessageSignature, CryptDecryptMessage