Edit

Share via


Message.DestinationSymmetricKey Property

Definition

Gets or sets the symmetric key used to encrypt application-encrypted messages or messages sent to foreign queues.

C#
[System.Messaging.MessagingDescription("MsgDestinationSymmetricKey")]
public byte[] DestinationSymmetricKey { get; set; }

Property Value

Byte[]

An array of byte values that specifies the destination symmetric key used to encrypt the message. The default is a zero-length array.

Attributes

Exceptions

The message queue is filtered to ignore the DestinationSymmetricKey property.

Remarks

Two scenarios require you to use the DestinationSymmetricKey property. The first is when your application, rather than Message Queuing, encrypts a message. The second is when you send an encrypted message to a queuing system other than Message Queuing.

Before you set this property, you must encrypt the symmetric key with the public key of the receiving queue manager. When you send an application-encrypted message, the receiving queue manager uses the symmetric key to decrypt the message before sending it to its destination queue.

If you send a message to a foreign queue, the message is first received by the appropriate connector application, which forwards the encrypted message with the attached symmetric key to the receiving application. It is then the responsibility of the receiving application to decrypt the message using the symmetric key.

When you set the DestinationSymmetricKey property, you must also set the ConnectorType property. When the message is sent, Message Queuing ignores the DestinationSymmetricKey property if the ConnectorType property is not also set.

The DestinationSymmetricKey property has a maximum array size of 256.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also