CmsRecipient 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 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)
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- 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 具有以下默认属性值。
Property | 默认值 |
---|---|
RecipientIdentifierType | IssuerAndSerialNumber |
RSAEncryptionPadding | null |
另请参阅
- CmsRecipient(SubjectIdentifierType, X509Certificate2)
- CmsRecipient(X509Certificate2, RSAEncryptionPadding)
适用于
CmsRecipient(SubjectIdentifierType, X509Certificate2)
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- 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)
- CmsRecipient(SubjectIdentifierType, X509Certificate2, RSAEncryptionPadding)
适用于
CmsRecipient(X509Certificate2, RSAEncryptionPadding)
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- 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 填充模式。
例外
certificate
或 rsaEncryptionPadding
参数为 null
。
注解
类 CmsRecipient 具有以下默认属性值。
Property | 默认值 |
---|---|
RecipientIdentifierType | IssuerAndSerialNumber |
适用于
CmsRecipient(SubjectIdentifierType, X509Certificate2, RSAEncryptionPadding)
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- CmsRecipient.cs
- Source:
- 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 填充模式。
例外
certificate
或 rsaEncryptionPadding
参数为 null
。
certificate
参数公钥未被识别为 RSA 公钥。