Share via


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 (一度だけ使われる数) です。 値は、符号なしのビッグ エンディアンの整数として解釈され、エンコード形式に正規化されることがあります。

requestSignerCertificates
Boolean

発行されたタイムスタンプ トークンの署名証明書がタイムスタンプ局 (TSA) に含まれる必要がある場合は true。それ以外の場合は false

extensions
X509ExtensionCollection

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

戻り値

選択した値を表す Rfc3161TimestampRequest です。

例外

hashAlgorithm.Namenull または Empty です。

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

注釈

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

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

適用対象

こちらもご覧ください