Rfc3161TimestampTokenInfo 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的参数初始化 Rfc3161TimestampTokenInfo 类的新实例。
public Rfc3161TimestampTokenInfo (System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, ReadOnlyMemory<byte> messageHash, ReadOnlyMemory<byte> serialNumber, DateTimeOffset timestamp, long? accuracyInMicroseconds = default, bool isOrdering = false, ReadOnlyMemory<byte>? nonce = default, ReadOnlyMemory<byte>? timestampAuthorityName = default, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default);
public Rfc3161TimestampTokenInfo (System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, ReadOnlyMemory<byte> messageHash, ReadOnlyMemory<byte> serialNumber, DateTimeOffset timestamp, long? accuracyInMicroseconds = default, bool isOrdering = false, ReadOnlyMemory<byte>? nonce = default, ReadOnlyMemory<byte>? timestampAuthorityName = default, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = default);
new System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo : System.Security.Cryptography.Oid * System.Security.Cryptography.Oid * ReadOnlyMemory<byte> * ReadOnlyMemory<byte> * DateTimeOffset * Nullable<int64> * bool * Nullable<ReadOnlyMemory<byte>> * Nullable<ReadOnlyMemory<byte>> * System.Security.Cryptography.X509Certificates.X509ExtensionCollection -> System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo
Public Sub New (policyId As Oid, hashAlgorithmId As Oid, messageHash As ReadOnlyMemory(Of Byte), serialNumber As ReadOnlyMemory(Of Byte), timestamp As DateTimeOffset, Optional accuracyInMicroseconds As Nullable(Of Long) = Nothing, Optional isOrdering As Boolean = false, Optional nonce As Nullable(Of ReadOnlyMemory(Of Byte)) = Nothing, Optional timestampAuthorityName As Nullable(Of ReadOnlyMemory(Of Byte)) = Nothing, Optional extensions As X509ExtensionCollection = Nothing)
参数
- policyId
- Oid
一个 OID,表示在其中生成响应的 TSA 策略。
- hashAlgorithmId
- Oid
要时间戳的数据的哈希算法 OID。
- messageHash
- ReadOnlyMemory<Byte>
要时间戳的数据的哈希值。
- serialNumber
- ReadOnlyMemory<Byte>
由 TSA 分配给的 Rfc3161TimestampTokenInfo整数。
- timestamp
- DateTimeOffset
标记中编码的时间戳。
- isOrdering
- Boolean
true
若要确保同一 TSA 中的每个时间戳令牌始终可以按 timestamp
准确度排序; false
要指示 timestamp
TSA 创建令牌的时间。
- nonce
- Nullable<ReadOnlyMemory<Byte>>
与此时间戳令牌关联的 nonce。 使用 nonce 始终允许检测重播,因此建议使用它。
- timestampAuthorityName
- Nullable<ReadOnlyMemory<Byte>>
TSA 名称标识中的提示。 对响应进行签名的实体的实际标识始终通过证书标识符进行。
- extensions
- X509ExtensionCollection
与时间戳关联的扩展值。
例外
ASN.1 数据已损坏。
注解
如果 hashAlgorithmId
、、policyId``messageHash
或nonce
存在于中Rfc3161TimestampRequest,则应使用相同的值。 如果未 accuracyInMicroseconds
提供,则可通过其他方式(例如 policyId
)获得准确性。