Message Queuing-Encrypted Messages
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 to | For |
---|---|
MQMSG_PRIV_LEVEL_BODY | 40-bit encryption (MSMQ 1.0 and MSMQ 2.0) |
MQMSG_PRIV_LEVEL_BODY_BASE | 40-bit encryption (MSMQ 2.0 and later) |
MQMSG_PRIV_LEVEL_BODY_ENHANCED | 128-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.
More Information
For information on | See |
---|---|
Manually encrypting messages when there is no access to the directory service. | Application-Encrypted Messages |
Reading private messages from the destination queue | Reading Private Messages |
Examples
For an example of | See |
---|---|
Enforcing encryption when creating a queue | C/C++ Code Example: Enforcing Encryption Visual Basic Code Example: Enforcing Encryption |
Requesting encryption when sending messages | C/C++ Code Example: Requesting Encryption Visual Basic Code Example: Requesting Encryption |