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;
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 |
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.
CryptDecryptAndVerifyMessageSignature, CryptDecryptMessage