MSMQMessage.EncryptAlgorithm

 

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

The EncryptAlgorithm property of the MSMQMessage object specifies the encryption algorithm used to encrypt the message body of a private message.

Data type: Long
Run-time access: Read/write
Property EncryptAlgorithm As Long  

Property Value

The EncryptAlgorithm property can have one of the following values:

  • CALG_RC2 (default)

  • CALG_RC4

Message encryption is based on public-key encryption using Microsoft® CryptoAPI with an underlying RSA provider.

Remarks

When sending private messages, Message Queuing uses the algorithm specified by EncryptAlgorithm to encrypt the body of the message and to decrypt the message body when it is accepted by the destination queue manager.

Message can be encrypted by Message Queuing and by applications. For information on Message Queuing and application encryption, see Message Encryption.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_ENCRYPTION_ALG.

Example Code

The following examples are included in Using Message Queuing.

For an example of See
Requesting encryption when sending messages Visual Basic Code Example: Requesting Encryption
Setting the privacy level of a queue to enforce encryption when creating a queue Visual Basic Code Example: Enforcing Encryption

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib

See Also

MSMQMessage
MSMQMessage.PrivLevel
PROPID_M_ENCRYPTION_ALG