Share via


Rfc3161TimestampRequest.CreateFromSignerInfo Metoda

Definice

Vytvoří požadavek časového razítka pomocí hodnoty hash podpisu poskytnuté podepisujícího uživatele pomocí zadaného algoritmu.

public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo (System.Security.Cryptography.Pkcs.SignerInfo signerInfo, 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 CreateFromSignerInfo (System.Security.Cryptography.Pkcs.SignerInfo signerInfo, 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 CreateFromSignerInfo : System.Security.Cryptography.Pkcs.SignerInfo * 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 CreateFromSignerInfo (signerInfo As SignerInfo, 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

Parametry

signerInfo
SignerInfo

Informace o podepisující službě CMS pro sestavení žádosti o časové razítko

hashAlgorithm
HashAlgorithmName

Hashovací algoritmus, který se má použít s tímto požadavkem časového razítka.

requestedPolicyId
Oid

Identifikátor objektu (OID) pro zásadu časového razítka, kterou by měla použít autorita časového razítka (TSA), nebo null k vyjádření žádné preference.

nonce
Nullable<ReadOnlyMemory<Byte>>

Nepovinný argument nonce (číslo použité jednou) k jednoznačné identifikaci tohoto požadavku na spárování s odpovědí. Hodnota je interpretována jako celé číslo big-endian bez znaménka a může být normalizována do formátu kódování.

requestSignerCertificates
Boolean

truek označení, že autorita časového razítka (TSA) musí obsahovat podpisový certifikát do vystaveného tokenu časového razítka; v opačném případě . false

extensions
X509ExtensionCollection

Volitelná kolekce rozšíření, která se mají zahrnout do žádosti.

Návraty

Představuje Rfc3161TimestampRequest zvolené hodnoty.

Výjimky

signerInfo je null.

hashAlgorithm.Name je null nebo Empty.

hashAlgorithm není známý hashovací algoritmus.

Poznámky

Tento konstruktor vytvoří časové razítko pro hodnotu SignerInfo podpisu hodnoty podle doporučení IETF RFC 3161 Dodatek A (Atribut časového razítka podpisu pomocí CMS).

Hodnota nonce v této metodě je považována za celé číslo bez znaménka big-endian. Tato metoda normalizuje vstup do kódování BER INTEGER před přiřazením hodnoty nonce. Normalizovanou hodnotu vrátí GetNonce() metoda.

Platí pro

Viz také