Rfc3161TimestampRequest.CreateFromData メソッド

定義

指定されたアルゴリズムを使用して指定されたデータをハッシュすることによって、タイムスタンプ要求を作成します。

public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(ReadOnlySpan<byte> data, 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 CreateFromData(ReadOnlySpan<byte> data, 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 CreateFromData : ReadOnlySpan<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 CreateFromData (data As ReadOnlySpan(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

パラメーター

data
ReadOnlySpan<Byte>

タイムスタンプへのデータ。このメソッドによってハッシュされます。

hashAlgorithm
HashAlgorithmName

このタイムスタンプ要求で使用するハッシュ アルゴリズム。

requestedPolicyId
Oid

タイムスタンプ機関 (TSA) が使用するタイムスタンプ ポリシーのオブジェクト識別子 (OID)、または優先設定を表すために null

nonce
Nullable<ReadOnlyMemory<Byte>>

この要求を応答とペアリングするために一意に識別する省略可能な nonce (1 回使用される数値)。 値は符号なしビッグ エンディアン整数として解釈され、エンコード形式に正規化できます。

requestSignerCertificates
Boolean

true タイムスタンプ機関 (TSA) が発行されたタイムスタンプ トークンに署名証明書を含める必要があることを示す場合。それ以外の場合は false

extensions
X509ExtensionCollection

要求に含める拡張機能の省略可能なコレクション。

返品

選択した値を表す Rfc3161TimestampRequest

例外

hashAlgorithm.Namenull または Empty

hashAlgorithm は既知のハッシュ アルゴリズムではありません。

注釈

暗号化タイムスタンプは、データのハッシュと、データのハッシュに使用されるハッシュ アルゴリズムのアルゴリズム識別子の組み合わせに常に適用されます。 このメソッドは、データがまだハッシュされていない場合に CreateFromHash(ReadOnlyMemory<Byte>, HashAlgorithmName, Oid, Nullable<ReadOnlyMemory<Byte>>, Boolean, X509ExtensionCollection) する代わりに便利です。

このメソッドの nonce 値は、符号なし、ビッグ エンディアン整数として扱われます。 このメソッドは、nonce 値を割り当てる前に、入力を BER INTEGER エンコードに正規化します。 正規化された値は、 GetNonce() メソッドによって返されます。

適用対象

こちらもご覧ください