Message.HashAlgorithm 属性

定义

获取或设置消息队列在验证消息或为消息创建数字签名时使用的哈希算法。

public:
 property System::Messaging::HashAlgorithm HashAlgorithm { System::Messaging::HashAlgorithm get(); void set(System::Messaging::HashAlgorithm value); };
[System.Messaging.MessagingDescription("MsgHashAlgorithm")]
public System.Messaging.HashAlgorithm HashAlgorithm { get; set; }
[<System.Messaging.MessagingDescription("MsgHashAlgorithm")>]
member this.HashAlgorithm : System.Messaging.HashAlgorithm with get, set
Public Property HashAlgorithm As HashAlgorithm

属性值

HashAlgorithm 枚举值之一。 对于 Windows XP,默认值为 SHA。 否则默认值为 MD5

属性

例外

消息队列经过筛选后忽略了 HashAlgorithm 属性。

注解

在源计算机上,消息队列在为消息创建数字签名时使用哈希算法。 然后,目标队列管理器在收到消息时使用相同的哈希算法对消息进行身份验证。

由于 MD5 和 SHA1 的冲突问题,Microsoft建议使用 SHA256。

适用于

另请参阅