Message Queuing-Encrypted Messages


Updated: July 19, 2016

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

To let the source queue manager encrypt your messages, the sending application must set the privacy level and encryption algorithm (optional) properties of the message when the message is sent.

The privacy level property (PROPID_M_PRIV_LEVEL or MSMQMessage.PrivLevel) of the message must be set to one of the following.

Set toFor
MQMSG_PRIV_LEVEL_BODY40-bit encryption (MSMQ 1.0 and MSMQ 2.0)
MQMSG_PRIV_LEVEL_BODY_BASE40-bit encryption (MSMQ 2.0 and later)
MQMSG_PRIV_LEVEL_BODY_ENHANCED128-bit encryption (MSMQ 2.0 and later)

The encryption algorithm property (PROPID_M_ENCRYPTION_ALG or MSMQMessage.EncryptAlgorithm) of the message can be set to MQMSG_RC2 or MQMSG_RC4. If this property is not set, the default RC2 encryption algorithm is used to encrypt the message. Message encryption is based on public-key encryption using Microsoft® CryptoAPI with the underlying Microsoft Base Cryptographic Provider for 40-bit encryption or the Microsoft Enhanced Cryptographic Provider for 128-bit encryption.

For information onSee
Manually encrypting messages when there is no access to the directory service.Application-Encrypted Messages
Reading private messages from the destination queueReading Private Messages
For an example ofSee
Enforcing encryption when creating a queueC/C++ Code Example: Enforcing Encryption

 Visual Basic Code Example: Enforcing Encryption
Requesting encryption when sending messagesC/C++ Code Example: Requesting Encryption

 Visual Basic Code Example: Requesting Encryption

Community Additions