The PROPID_M_ENCRYPTION_ALG property specifies the encryption algorithm used to encrypt the message body of a private message.
CALG_RC2 (the default)
CALG_RC4
If the message is a private message (PROPID_M_PRIV_LEVEL is set to MQMSG_PRIV_LEVEL_BODY), the source Queue Manager uses this algorithm to encrypt the message and the target Queue Manager uses the matching decryption algorithm to decrypt the message. PROPID_M_ENCRYPTION_ALG is ignored if the message is not a private message (PROPID_M_PRIV_LEVEL). For a complete example of sending private messages (including creating a queue that can only accept private messages), see Sending Private Messages.
CALG_RC2 and CALG_RC4 are defined by the ALG_ID data type in wincrypt.h. For more information on the various encryption methods, see the Microsoft® Cryptographic API (CryptoAPI) in the Microsoft Platform SDK.
When passing PROPID_M_ENCRYPTION_ALG to MQReceiveMessage, the corresponding VT field in the aPropVar array can be set to VT_NULL.
This example shows how PROPID_M_ENCRYPTION_ALG is specified in the MQMSGPROPS structure:
MsgProps.aPropID[i] = PROPID_M_ENCRYPTION_ALG ; //PropId
MsgProps.aPropVar[i].vt = VT_UI4; //Type
MsgProps.aPropVar[i].ulVal = CALG_RC4; //Value
For an example of using PROID_M_ENCRYPTION_ALG, see Sending Private Messages.
Windows NT: Requires version 4.0 SP3 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mq.h.
Import Library: Use mqrt.lib.
Unicode: Defined only as Unicode.