SignedCms 构造函数

定义

初始化 SignedCms 类的新实例。Initializes a new instance of the SignedCms class.

重载

SignedCms()

SignedCms() 构造函数创建 SignedCms 类的实例。The SignedCms() constructor creates an instance of the SignedCms class.

SignedCms(SubjectIdentifierType)

SignedCms(SubjectIdentifierType) 构造函数通过使用指定的主题标识符类型作为签名者默认的主题标识符类型来创建 SignedCms 类的一个实例。The SignedCms(SubjectIdentifierType) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers.

SignedCms(ContentInfo)

SignedCms(ContentInfo) 构造函数通过使用指定的内容信息作为内部内容来创建 SignedCms 类的一个实例。The SignedCms(ContentInfo) constructor creates an instance of the SignedCms class by using the specified content information as the inner content.

SignedCms(ContentInfo, Boolean)

SignedCms(ContentInfo, Boolean) 构造函数通过使用指定的内容信息作为内部内容,同时使用 Detached 状态来创建 SignedCms 类的一个实例。The SignedCms(ContentInfo, Boolean) constructor creates an instance of the SignedCms class by using the specified content information as the inner content and by using the detached state.

SignedCms(SubjectIdentifierType, ContentInfo)

SignedCms(SubjectIdentifierType, ContentInfo) 构造函数创建 SignedCms 类的一个实例,创建时使用指定的主题标识符类型作为签名者默认的主题标识符类型,将内容信息作为内部内容。The SignedCms(SubjectIdentifierType, ContentInfo) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers and content information as the inner content.

SignedCms(SubjectIdentifierType, ContentInfo, Boolean)

SignedCms(SubjectIdentifierType, ContentInfo, Boolean) 构造函数创建 SignedCms 类的一个实例,创建时使用指定的主题标识符类型作为签名者默认的主题标识符类型,将内容信息作为内部内容,同时使用 Detached 状态。The SignedCms(SubjectIdentifierType, ContentInfo, Boolean) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers, the content information as the inner content, and by using the detached state.

SignedCms()

SignedCms() 构造函数创建 SignedCms 类的实例。The SignedCms() constructor creates an instance of the SignedCms class.

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

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

SignedCms类具有以下默认属性值。The SignedCms class has the following default property values.

PropertyProperty 默认值Default value
ContentInfo 1.2.840.113549.1.7.1 (数据) 长度:零1.2.840.113549.1.7.1 (data)Length: zero
Detached 已分离状态: false 签名的内容包括在 CMS/PKCS #7 消息中以及签名信息。Detached state: false The content that is signed is included in the CMS/PKCS #7 message along with the signature information.

签名者的默认值 SubjectIdentifierType 为 SubjectIdentifierType. IssuerAndSerialNumber。The default SubjectIdentifierType for signers is SubjectIdentifierType.IssuerAndSerialNumber.

如果已分离状态 false (默认) ,则会将签名的内容包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the signed content is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以对消息发送方进行验证。This may be useful in an archiving application that archives message content whether the message sender can be verified for authenticity.

适用于

SignedCms(SubjectIdentifierType)

SignedCms(SubjectIdentifierType) 构造函数通过使用指定的主题标识符类型作为签名者默认的主题标识符类型来创建 SignedCms 类的一个实例。The SignedCms(SubjectIdentifierType) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers.

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

参数

signerIdentifierType
SubjectIdentifierType

一个 SubjectIdentifierType 成员,为签名者指定默认主题标识符类型。A SubjectIdentifierType member that specifies the default subject identifier type for signers.

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

有关此构造函数使用的默认属性值,请参阅 SignedCms()For the default property values used with this constructor, see SignedCms().

如果已分离状态 false (默认) ,则已签名内容将包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the content that is signed is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以对消息发送方进行验证。This might be useful in an archiving application that archives message content whether the message sender can be verified for authenticity.

适用于

SignedCms(ContentInfo)

SignedCms(ContentInfo) 构造函数通过使用指定的内容信息作为内部内容来创建 SignedCms 类的一个实例。The SignedCms(ContentInfo) constructor creates an instance of the SignedCms class by using the specified content information as the inner content.

public:
 SignedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo);
public:
 SignedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ content);
public SignedCms (System.Security.Cryptography.Pkcs.ContentInfo contentInfo);
public SignedCms (System.Security.Cryptography.Pkcs.ContentInfo content);
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.SignedCms
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.SignedCms
Public Sub New (contentInfo As ContentInfo)
Public Sub New (content As ContentInfo)

参数

contentInfocontent
ContentInfo

一个 ContentInfo 对象,它将内容信息指定为 SignedCms 消息的内部内容。A ContentInfo object that specifies the content information as the inner content of the SignedCms message.

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

有关此构造函数使用的默认属性值,请参阅 SignedCms()For the default property values used with this constructor, see SignedCms().

如果已分离状态 false (默认) ,则已签名内容将包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the content that is signed is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以对消息发送方进行验证。This might be useful in an archiving application that archives message content whether the message sender can be verified for authenticity.

适用于

SignedCms(ContentInfo, Boolean)

SignedCms(ContentInfo, Boolean) 构造函数通过使用指定的内容信息作为内部内容,同时使用 Detached 状态来创建 SignedCms 类的一个实例。The SignedCms(ContentInfo, Boolean) constructor creates an instance of the SignedCms class by using the specified content information as the inner content and by using the detached state.

public:
 SignedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo, bool detached);
public:
 SignedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ content, bool detached);
public SignedCms (System.Security.Cryptography.Pkcs.ContentInfo contentInfo, bool detached);
public SignedCms (System.Security.Cryptography.Pkcs.ContentInfo content, bool detached);
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.ContentInfo * bool -> System.Security.Cryptography.Pkcs.SignedCms
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.ContentInfo * bool -> System.Security.Cryptography.Pkcs.SignedCms
Public Sub New (contentInfo As ContentInfo, detached As Boolean)
Public Sub New (content As ContentInfo, detached As Boolean)

参数

contentInfocontent
ContentInfo

一个 ContentInfo 对象,它将内容信息指定为 SignedCms 消息的内部内容。A ContentInfo object that specifies the content information as the inner content of the SignedCms message.

detached
Boolean

一个 Boolean 值,指定 SignedCms 对象是否用于分离签名。A Boolean value that specifies whether the SignedCms object is for a detached signature. 如果 detachedtrue,则分离签名。If detached is true, the signature is detached. 如果 detachedfalse,则不分离签名。If detached is false, the signature is not detached.

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

有关此构造函数使用的默认属性值,请参阅 SignedCms()For the default property values used with this constructor, see SignedCms().

如果已分离状态 false (默认) ,则已签名内容将包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the content that is signed is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以对消息发送方进行验证。This might be useful in an archiving application that archives message content whether the message sender can be verified for authenticity.

适用于

SignedCms(SubjectIdentifierType, ContentInfo)

SignedCms(SubjectIdentifierType, ContentInfo) 构造函数创建 SignedCms 类的一个实例,创建时使用指定的主题标识符类型作为签名者默认的主题标识符类型,将内容信息作为内部内容。The SignedCms(SubjectIdentifierType, ContentInfo) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers and content information as the inner content.

public:
 SignedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo);
public:
 SignedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ content);
public SignedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo);
public SignedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo content);
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.SignedCms
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.SignedCms
Public Sub New (signerIdentifierType As SubjectIdentifierType, contentInfo As ContentInfo)
Public Sub New (signerIdentifierType As SubjectIdentifierType, content As ContentInfo)

参数

signerIdentifierType
SubjectIdentifierType

一个 SubjectIdentifierType 成员,为签名者指定默认主题标识符类型。A SubjectIdentifierType member that specifies the default subject identifier type for signers.

contentInfocontent
ContentInfo

一个 ContentInfo 对象,它将内容信息指定为 SignedCms 消息的内部内容。A ContentInfo object that specifies the content information as the inner content of the SignedCms message.

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

有关此构造函数使用的默认属性值,请参阅 SignedCms()For the default property values used with this constructor, see SignedCms().

如果已分离状态 false (默认) ,则已签名内容将包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the content that is signed is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以对消息发送方进行验证。This might be useful in an archiving application that archives message content whether the message sender can be verified for authenticity.

适用于

SignedCms(SubjectIdentifierType, ContentInfo, Boolean)

SignedCms(SubjectIdentifierType, ContentInfo, Boolean) 构造函数创建 SignedCms 类的一个实例,创建时使用指定的主题标识符类型作为签名者默认的主题标识符类型,将内容信息作为内部内容,同时使用 Detached 状态。The SignedCms(SubjectIdentifierType, ContentInfo, Boolean) constructor creates an instance of the SignedCms class by using the specified subject identifier type as the default subject identifier type for signers, the content information as the inner content, and by using the detached state.

public:
 SignedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo, bool detached);
public:
 SignedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType signerIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ content, bool detached);
public SignedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo, bool detached);
public SignedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo content, bool detached);
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo * bool -> System.Security.Cryptography.Pkcs.SignedCms
new System.Security.Cryptography.Pkcs.SignedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo * bool -> System.Security.Cryptography.Pkcs.SignedCms
Public Sub New (signerIdentifierType As SubjectIdentifierType, contentInfo As ContentInfo, detached As Boolean)
Public Sub New (signerIdentifierType As SubjectIdentifierType, content As ContentInfo, detached As Boolean)

参数

signerIdentifierType
SubjectIdentifierType

一个 SubjectIdentifierType 成员,为签名者指定默认主题标识符类型。A SubjectIdentifierType member that specifies the default subject identifier type for signers.

contentInfocontent
ContentInfo

一个 ContentInfo 对象,它将内容信息指定为 SignedCms 消息的内部内容。A ContentInfo object that specifies the content information as the inner content of the SignedCms message.

detached
Boolean

一个 Boolean 值,指定 SignedCms 对象是否用于分离签名。A Boolean value that specifies whether the SignedCms object is for a detached signature. 如果 detachedtrue,则分离签名。If detached is true, the signature is detached. 如果 detached 为 false,则不分离签名。If detached is false, the signature is not detached.

例外

向不接受空引用作为有效参数的方法传递了一个空引用。A null reference was passed to a method that does not accept it as a valid argument.

注解

如果已分离状态 false (默认) ,则已签名内容将包含在 CMS/PKCS #7 消息中以及签名信息。If the detached state is false (the default), the content that is signed is included in the CMS/PKCS #7 message along with the signature information. 如果已分离状态为 true ,如果不能对 S/MIME 消息进行解码,则无法对其进行解码的客户端仍然可以看到该消息的内容。If the detached state is true, clients that cannot decode S/MIME messages can still see the content of the message if it is sent separately. 这在存档消息内容的存档应用程序中可能非常有用,无论是否可以验证消息发送方的真实性。This may be useful in an archiving application that archives message content whether or not the message sender can be verified for authenticity.

适用于