CmsSigner Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy CmsSigner.

Przeciążenia

CmsSigner()

Inicjuje nowe wystąpienie klasy CmsSigner z domyślnymi wartościami.

CmsSigner(CspParameters)
Przestarzałe.

Inicjuje CmsSigner nowe wystąpienie klasy z utrwalonego klucza.

CmsSigner(SubjectIdentifierType)

Inicjuje CmsSigner nowe wystąpienie klasy o określonym typie identyfikatora podmiotu.

CmsSigner(X509Certificate2)

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu podpisywania.

CmsSigner(SubjectIdentifierType, X509Certificate2)

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu osoby podpisającego i typu identyfikatora podmiotu.

CmsSigner(SubjectIdentifierType, X509Certificate2, AsymmetricAlgorithm)

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu osoby podpisającego, typu identyfikatora podmiotu i obiektu klucza prywatnego.

CmsSigner(SubjectIdentifierType, X509Certificate2, RSA, RSASignaturePadding)

Inicjuje nowe wystąpienie klasy CmsSigner z określonym certyfikatem osoby podpisujące, typem identyfikatora podmiotu, obiektem klucza prywatnego i wypełnieniem podpisów RSA.

CmsSigner()

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje nowe wystąpienie klasy CmsSigner z domyślnymi wartościami.

public:
 CmsSigner();
public CmsSigner ();
Public Sub New ()

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
SignerIdentifierType SubjectIdentifierType.IssuerAndSerialNumber
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.ExcludeRoot

Dotyczy

CmsSigner(CspParameters)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Przestroga

CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.

Inicjuje CmsSigner nowe wystąpienie klasy z utrwalonego klucza.

public:
 CmsSigner(System::Security::Cryptography::CspParameters ^ parameters);
[System.Obsolete("CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.", DiagnosticId="SYSLIB0034", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CmsSigner (System.Security.Cryptography.CspParameters parameters);
public CmsSigner (System.Security.Cryptography.CspParameters parameters);
[<System.Obsolete("CmsSigner(CspParameters) is obsolete and is not supported. Use an alternative constructor instead.", DiagnosticId="SYSLIB0034", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.CspParameters -> System.Security.Cryptography.Pkcs.CmsSigner
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.CspParameters -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (parameters As CspParameters)

Parametry

parameters
CspParameters

Parametry dostawcy CSP do opisania klucza podpisywania do użycia.

Atrybuty

Wyjątki

Tylko platformy .NET Core i .NET 5+: we wszystkich przypadkach.

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
SignerIdentifierType SubjectIdentifierType.SubjectKeyIdentifier
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.None

Ważne

Ta metoda jest obsługiwana tylko w .NET Framework. Jego użycie na platformie .NET Core zgłasza błąd PlatformNotSupportedException.

Dotyczy

CmsSigner(SubjectIdentifierType)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje CmsSigner nowe wystąpienie klasy o określonym typie identyfikatora podmiotu.

public:
 CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType)

Parametry

signerIdentifierType
SubjectIdentifierType

Schemat służący do identyfikowania używanego certyfikatu podpisywania.

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.None jeśli SignerIdentifierType to SubjectIdentifierType.NoSignature,

X509IncludeOption.ExcludeRoot Inaczej

Dotyczy

CmsSigner(X509Certificate2)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu podpisywania.

public:
 CmsSigner(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public CmsSigner (System.Security.Cryptography.X509Certificates.X509Certificate2? certificate);
public CmsSigner (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (certificate As X509Certificate2)

Parametry

certificate
X509Certificate2

Certyfikat, którego klucz prywatny będzie używany do podpisywania komunikatu.

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
SignerIdentifierType SubjectIdentifierType.IssuerAndSerialNumber
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.ExcludeRoot

Certyfikat podpisywania określony przez certificate parametr nie jest sprawdzany pod kątem ważności danych wejściowych. Aby zweryfikować certyfikat przed dostarczeniem go do tego konstruktora, użyj X509Chain.Build metody .

Dotyczy

CmsSigner(SubjectIdentifierType, X509Certificate2)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu osoby podpisającego i typu identyfikatora podmiotu.

public:
 CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2)

Parametry

signerIdentifierType
SubjectIdentifierType

Schemat służący do identyfikowania używanego certyfikatu podpisywania.

certificate
X509Certificate2

Certyfikat, którego klucz prywatny będzie używany do podpisywania komunikatu.

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.None jeśli SignerIdentifierType to SubjectIdentifierType.NoSignature,

X509IncludeOption.ExcludeRoot Inaczej

Certyfikat podpisywania określony przez certificate parametr nie jest sprawdzany pod kątem ważności danych wejściowych. Aby zweryfikować certyfikat przed dostarczeniem go do tego konstruktora, użyj X509Chain.Build metody .

Dotyczy

CmsSigner(SubjectIdentifierType, X509Certificate2, AsymmetricAlgorithm)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje CmsSigner nowe wystąpienie klasy przy użyciu określonego certyfikatu osoby podpisającego, typu identyfikatora podmiotu i obiektu klucza prywatnego.

public:
 CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::AsymmetricAlgorithm ^ privateKey);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.AsymmetricAlgorithm? privateKey);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.AsymmetricAlgorithm privateKey);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.AsymmetricAlgorithm -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As AsymmetricAlgorithm)

Parametry

signerIdentifierType
SubjectIdentifierType

Jedna z wartości wyliczenia, która określa schemat używany do identyfikowania używanego certyfikatu podpisywania.

certificate
X509Certificate2

Certyfikat, którego klucz prywatny będzie używany do podpisywania komunikatu.

privateKey
AsymmetricAlgorithm

Obiekt klucza prywatnego do użycia podczas podpisywania komunikatu.

Uwagi

Ten konstruktor powoduje następujące wartości właściwości domyślne:

Właściwość Wartość domyślna
DigestAlgorithm 2.16.840.1.101.3.4.2.1 (SHA-256)
IncludeOption X509IncludeOption.None jeśli SignerIdentifierType to SubjectIdentifierType.NoSignature,

X509IncludeOption.ExcludeRoot Inaczej

Certyfikat podpisywania określony przez certificate parametr nie jest sprawdzany pod kątem ważności danych wejściowych. Aby zweryfikować certyfikat przed dostarczeniem go do tego konstruktora, użyj X509Chain.Build metody .

Ten konstruktor nie sprawdza, czy privateKey parametr odpowiada kluczowi publicznemu w pliku certificate. Jeśli klucze nie są zgodne, SignedCms klasa i ComputeCounterSignature(CmsSigner) metoda zgłaszają błąd CryptographicException podczas procesu podpisywania.

Dotyczy

CmsSigner(SubjectIdentifierType, X509Certificate2, RSA, RSASignaturePadding)

Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs
Źródło:
CmsSigner.cs

Inicjuje nowe wystąpienie klasy CmsSigner z określonym certyfikatem osoby podpisujące, typem identyfikatora podmiotu, obiektem klucza prywatnego i wypełnieniem podpisów RSA.

public:
 CmsSigner(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::RSA ^ privateKey, System::Security::Cryptography::RSASignaturePadding ^ signaturePadding);
public CmsSigner (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.RSA? privateKey, System.Security.Cryptography.RSASignaturePadding? signaturePadding);
new System.Security.Cryptography.Pkcs.CmsSigner : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.RSA * System.Security.Cryptography.RSASignaturePadding -> System.Security.Cryptography.Pkcs.CmsSigner
Public Sub New (signerIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, privateKey As RSA, signaturePadding As RSASignaturePadding)

Parametry

signerIdentifierType
SubjectIdentifierType

Jedna z wartości wyliczenia, która określa schemat używany do identyfikowania używanego certyfikatu podpisywania.

certificate
X509Certificate2

Certyfikat, którego klucz prywatny będzie używany do podpisywania komunikatu.

privateKey
RSA

Obiekt klucza prywatnego do użycia podczas podpisywania komunikatu.

signaturePadding
RSASignaturePadding

Dopełnianie podpisów RSA do użycia.

Dotyczy