PROPID_M_ENCRYPTION_ALG

The PROPID_M_ENCRYPTION_ALG property specifies the encryption algorithm used to encrypt the message body of a private message.

Type Indicator
VT_UI4
PROPVARIANT Field
ulVal
Property Values
This property can be set to one of the following values:

CALG_RC2 (the default)

CALG_RC4

Remarks

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.

Example

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.

See Also

PROPID_M_PRIV_LEVEL


© 1997 by Microsoft Corporation. All rights reserved.