共用方式為


Rfc3161TimestampRequest.CreateFromHash 方法

定義

多載

CreateFromHash(ReadOnlyMemory<Byte>, HashAlgorithmName, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection)

使用預先計算的雜湊值和雜湊演算法名稱建立時間戳記要求。

CreateFromHash(ReadOnlyMemory<Byte>, Oid, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection)

使用預先計算雜湊值和雜湊演算法的物件識別碼來建立時間戳記要求。

CreateFromHash(ReadOnlyMemory<Byte>, HashAlgorithmName, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection)

來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs

使用預先計算的雜湊值和雜湊演算法名稱建立時間戳記要求。

public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid? requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = default);
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default);
static member CreateFromHash : ReadOnlyMemory<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.Oid * Nullable<ReadOnlyMemory<byte>> * bool * System.Security.Cryptography.X509Certificates.X509ExtensionCollection -> System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest
Public Shared Function CreateFromHash (hash As ReadOnlyMemory(Of Byte), hashAlgorithm As HashAlgorithmName, Optional requestedPolicyId As Oid = Nothing, Optional nonce As Nullable(Of ReadOnlyMemory(Of Byte)) = Nothing, Optional requestSignerCertificates As Boolean = false, Optional extensions As X509ExtensionCollection = Nothing) As Rfc3161TimestampRequest

參數

hash
ReadOnlyMemory<Byte>

要加上時間戳記的預先計算雜湊值。

hashAlgorithm
HashAlgorithmName

產生 hash 使用的雜湊演算法。

requestedPolicyId
Oid

時間戳記授權單位 (TSA) 應該使用的時間戳記原則物件識別碼 (OID),若為 null 則表示沒有偏好。

nonce
Nullable<ReadOnlyMemory<Byte>>

選擇性值,用於唯一比對回應的要求,null 則表示要求中不包含 nonce。

requestSignerCertificates
Boolean

true 以指出時間戳記授權單位 (TSA) 必須在簽發的時間戳記權杖包括簽署憑證;否則為 false

extensions
X509ExtensionCollection

要包含在要求中的選用延伸模組集合。

傳回

代表所選擇值的 Rfc3161TimestampRequest

例外狀況

hashAlgorithm 不是已知的雜湊演算法。

備註

這個方法會 hashAlgorithm 使用 參數來判斷物件標識碼 (OID) 以包含在時間戳要求中。 根據此方法不支援的哈希演算法建置時間戳的要求時,請使用 多 CreateFromHash(ReadOnlyMemory<Byte>, Oid, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection) 載。

這個方法中的 nonce 值會被視為不帶正負號的 big-endian 整數。 這個方法會將輸入正規化為 BER INTEGER 編碼,再指派 nonce 值。 方法會傳 GetNonce() 回標準化值。

另請參閱

適用於

CreateFromHash(ReadOnlyMemory<Byte>, Oid, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection)

來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs
來源:
Rfc3161TimestampRequest.cs

使用預先計算雜湊值和雜湊演算法的物件識別碼來建立時間戳記要求。

public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid? requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = default);
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash (ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default);
static member CreateFromHash : ReadOnlyMemory<byte> * System.Security.Cryptography.Oid * System.Security.Cryptography.Oid * Nullable<ReadOnlyMemory<byte>> * bool * System.Security.Cryptography.X509Certificates.X509ExtensionCollection -> System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest
Public Shared Function CreateFromHash (hash As ReadOnlyMemory(Of Byte), hashAlgorithmId As Oid, Optional requestedPolicyId As Oid = Nothing, Optional nonce As Nullable(Of ReadOnlyMemory(Of Byte)) = Nothing, Optional requestSignerCertificates As Boolean = false, Optional extensions As X509ExtensionCollection = Nothing) As Rfc3161TimestampRequest

參數

hash
ReadOnlyMemory<Byte>

要加上時間戳記的預先計算雜湊值。

hashAlgorithmId
Oid

產生 hash 之雜湊演算法的物件識別碼 (OID)。

requestedPolicyId
Oid

時間戳記授權單位 (TSA) 應該使用之時間戳記原則的物件識別碼 (OID),或使用 null 表示沒有偏好。

nonce
Nullable<ReadOnlyMemory<Byte>>

唯一識別此要求以將它與回應配對的選擇性 nonce (使用一次的數字)。 值會被解譯為不帶正負號的位元組由大到小,而且可能會被正規化為編碼格式。

requestSignerCertificates
Boolean

true 以指出時間戳記授權單位 (TSA) 必須在簽發的時間戳記權杖包括簽署憑證;否則為 false

extensions
X509ExtensionCollection

要包含在要求中的選用延伸模組集合。

傳回

代表所選擇值的 Rfc3161TimestampRequest

例外狀況

hashAlgorithmIdnull

hashAlgorithmIdValue 不是有效的 OID。

備註

這個方法中的 nonce 值會被視為不帶正負號的 big-endian 整數。 這個方法會將輸入正規化為 BER INTEGER 編碼,再指派 nonce 值。 方法會傳 GetNonce() 回標準化值。

適用於