共用方式為


CmsRecipient 建構函式

定義

初始化 CmsRecipient 類別的新執行個體。

多載

CmsRecipient(X509Certificate2)

使用指定的憑證,並使用公開金鑰演算法的預設加密模式和 IssuerAndSerialNumber 主體識別碼,初始化 CmsRecipient 類別的新執行個體。

CmsRecipient(SubjectIdentifierType, X509Certificate2)

使用指定的憑證和收件者識別碼類型,並使用公開金鑰演算法的預設加密模式,初始化 CmsRecipient 類別的新執行個體。

CmsRecipient(X509Certificate2, RSAEncryptionPadding)

使用指定的 RSA 憑證和 RSA 加密填補,並使用 IssuerAndSerialNumber 主體識別碼,初始化 CmsRecipient 類別的新執行個體。

CmsRecipient(SubjectIdentifierType, X509Certificate2, RSAEncryptionPadding)

使用指定的 RSA 憑證、RSA 加密填補和主體識別碼,初始化 CmsRecipient 類別的新執行個體。

CmsRecipient(X509Certificate2)

來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs

使用指定的憑證,並使用公開金鑰演算法的預設加密模式和 IssuerAndSerialNumber 主體識別碼,初始化 CmsRecipient 類別的新執行個體。

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

參數

certificate
X509Certificate2

為此收件者進行加密時要使用的憑證。

例外狀況

certificate 參數為 null

備註

類別 CmsRecipient 具有下列預設屬性值。

屬性 預設值
RecipientIdentifierType IssuerAndSerialNumber
RSAEncryptionPadding null

另請參閱

適用於

CmsRecipient(SubjectIdentifierType, X509Certificate2)

來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs

使用指定的憑證和收件者識別碼類型,並使用公開金鑰演算法的預設加密模式,初始化 CmsRecipient 類別的新執行個體。

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

參數

recipientIdentifierType
SubjectIdentifierType

用於識別所要使用收件者憑證的配置。

certificate
X509Certificate2

為此收件者進行加密時要使用的憑證。

例外狀況

certificate 參數為 null

不支援 recipientIdentifierType 值。

另請參閱

適用於

CmsRecipient(X509Certificate2, RSAEncryptionPadding)

來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs

使用指定的 RSA 憑證和 RSA 加密填補,並使用 IssuerAndSerialNumber 主體識別碼,初始化 CmsRecipient 類別的新執行個體。

public:
 CmsRecipient(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::RSAEncryptionPadding ^ rsaEncryptionPadding);
public CmsRecipient (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding);
new System.Security.Cryptography.Pkcs.CmsRecipient : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.RSAEncryptionPadding -> System.Security.Cryptography.Pkcs.CmsRecipient
Public Sub New (certificate As X509Certificate2, rsaEncryptionPadding As RSAEncryptionPadding)

參數

certificate
X509Certificate2

為此收件者進行加密時要使用的憑證。

rsaEncryptionPadding
RSAEncryptionPadding

為此收件者進行加密時要使用的 RSA 填補模式。

例外狀況

certificatersaEncryptionPadding 參數為 null

certificate 參數公開金鑰無法辨識為 RSA 公開金鑰。

-或-

不支援 recipientIdentifierType 值。

備註

類別 CmsRecipient 具有下列預設屬性值。

屬性 預設值
RecipientIdentifierType IssuerAndSerialNumber

適用於

CmsRecipient(SubjectIdentifierType, X509Certificate2, RSAEncryptionPadding)

來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs
來源:
CmsRecipient.cs

使用指定的 RSA 憑證、RSA 加密填補和主體識別碼,初始化 CmsRecipient 類別的新執行個體。

public:
 CmsRecipient(System::Security::Cryptography::Pkcs::SubjectIdentifierType recipientIdentifierType, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::RSAEncryptionPadding ^ rsaEncryptionPadding);
public CmsRecipient (System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding);
new System.Security.Cryptography.Pkcs.CmsRecipient : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.RSAEncryptionPadding -> System.Security.Cryptography.Pkcs.CmsRecipient
Public Sub New (recipientIdentifierType As SubjectIdentifierType, certificate As X509Certificate2, rsaEncryptionPadding As RSAEncryptionPadding)

參數

recipientIdentifierType
SubjectIdentifierType

用於識別所要使用收件者憑證的配置。

certificate
X509Certificate2

為此收件者進行加密時要使用的憑證。

rsaEncryptionPadding
RSAEncryptionPadding

為此收件者進行加密時要使用的 RSA 填補模式。

例外狀況

certificatersaEncryptionPadding 參數為 null

certificate 參數公開金鑰無法辨識為 RSA 公開金鑰。

另請參閱

適用於