LocalClientSecuritySettings.ReplayWindow 属性

定义

获取或设置消息 Nonce 有效的最长时间。Gets or sets the maximum time that a message nonce is valid.

public:
 property TimeSpan ReplayWindow { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan ReplayWindow { get; set; }
member this.ReplayWindow : TimeSpan with get, set
Public Property ReplayWindow As TimeSpan

属性值

TimeSpan

一个 TimeSpan,表示消息 Nonce 有效的最长时间。A TimeSpan that represents the maximum time that a message nonce is valid. 默认值为 5 分钟。The default is five minutes.

例外

此属性使用 set 设置为一个小于 0 的值。The property is set to a value less than 0.

示例

此示例演示如何获取此属性。This example shows how to get this property.

TimeSpan replayWindow = settings.ReplayWindow;
Dim replayWindow As TimeSpan = settings.ReplayWindow

注解

Nonce 是一个 "使用一次的数字",通常是在身份验证协议中使用的随机数字,以确保在使用重播时无法在攻击中使用旧通信。A nonce is a "number used once", often a random number used in an authentication protocol to ensure that old communications cannot be used in an attack by using replays.

适用于