SignedCms Classe
Definição
public ref class SignedCms sealed
public sealed class SignedCms
type SignedCms = class
Public NotInheritable Class SignedCms
- Herança
-
SignedCms
Comentários
A sintaxe da mensagem de criptografia RFC especifica os seguintes tipos MIME e extensões de nome de arquivo para CMS/PKCS #7 mensagens com esses tipos de conteúdo.The Cryptographic Message Syntax RFC specifies the following MIME types and file name extensions for CMS/PKCS #7 messages with these content types.
| Tipo de conteúdoContent type | tipo MIMEMIME type | ExtensãoExtension |
|---|---|---|
| envelopedDataenvelopedData | Application/PKCS7-MIMEapplication/pkcs7-mime | . p7m.p7m |
| signedDatasignedData | aplicativo/PKCS7-assinaturaapplication/pkcs7-signature | .p7s.p7c.p7s.p7c |
Construtores
| SignedCms() |
O construtor SignedCms() cria uma instância da classe SignedCms.The SignedCms() constructor creates an instance of the SignedCms class. |
| SignedCms(ContentInfo) |
O construtor SignedCms(ContentInfo) cria uma instância da classe SignedCms usando as informações de conteúdo especificadas como o conteúdo interno.The SignedCms(ContentInfo) constructor creates an instance of the SignedCms class by using the specified content information as the inner content. |
| SignedCms(ContentInfo, Boolean) |
O construtor SignedCms(ContentInfo, Boolean) cria uma instância da classe SignedCms usando as informações de conteúdo especificadas como o conteúdo interno e usando o estado desanexado.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) |
O construtor SignedCms(SubjectIdentifierType) cria uma instância da classe SignedCms usando o tipo de identificador de assunto especificado como o tipo padrão para signatários.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(SubjectIdentifierType, ContentInfo) |
O construtor SignedCms(SubjectIdentifierType, ContentInfo) cria uma instância da classe SignedCms usando o tipo de identificador de assunto especificado como o tipo padrão para signatários e as informações de conteúdo como conteúdo interno.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) |
O construtor SignedCms(SubjectIdentifierType, ContentInfo, Boolean) cria uma instância da classe SignedCms usando o tipo de identificador de assunto especificado como o tipo padrão para signatários, as informações de conteúdo como conteúdo interno e usando o estado desanexado.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. |
Propriedades
| Certificates |
A propriedade Certificates recupera os certificados associados à mensagem CMS/PKCS #7 codificada.The Certificates property retrieves the certificates associated with the encoded CMS/PKCS #7 message. |
| ContentInfo |
A propriedade ContentInfo recupera o conteúdo interno da mensagem CMS/PKCS nº 7 codificada.The ContentInfo property retrieves the inner contents of the encoded CMS/PKCS #7 message. |
| Detached |
A propriedade Detached recupera se o objeto SignedCms refere-se a uma assinatura desanexada.The Detached property retrieves whether the SignedCms object is for a detached signature. |
| SignerInfos |
A propriedade SignerInfos recupera a coleção SignerInfoCollection associada à mensagem CMS/PKCS #7.The SignerInfos property retrieves the SignerInfoCollection collection associated with the CMS/PKCS #7 message. |
| Version |
A propriedade Version recupera a versão da mensagem CMS/PKCS #7.The Version property retrieves the version of the CMS/PKCS #7 message. |
Métodos
| AddCertificate(X509Certificate2) |
Adiciona um certificado à coleção de certificados para a mensagem do CMS/PKCS nº 7 codificada.Adds a certificate to the collection of certificates for the encoded CMS/PKCS #7 message. |
| CheckHash() |
O método CheckHash() verifica a integridade dos dados da mensagem CMS/PKCS #7.The CheckHash() method verifies the data integrity of the CMS/PKCS #7 message. CheckHash() é um método especializado usado em aplicativos de infraestrutura de segurança específicos que apenas querem verificar o hash da mensagem CMS, em vez de executar uma verificação completa de assinatura digital.CheckHash() is a specialized method used in specific security infrastructure applications that only wish to check the hash of the CMS message, rather than perform a full digital signature verification. CheckHash() não autentica o autor nem o remetente da mensagem porque esse método não envolve verificar uma assinatura digital.CheckHash() does not authenticate the author nor sender of the message because this method does not involve verifying a digital signature. Para a verificação de uso geral da integridade e da autenticidade de uma mensagem CMS/PKCS #7, use o método CheckSignature(Boolean) ou CheckSignature(X509Certificate2Collection, Boolean).For general-purpose checking of the integrity and authenticity of a CMS/PKCS #7 message, use the CheckSignature(Boolean) or CheckSignature(X509Certificate2Collection, Boolean) methods. |
| CheckSignature(Boolean) |
O método CheckSignature(Boolean) verifica as assinaturas digitais na mensagem CMS/PKCS #7 assinada e, opcionalmente, valida os certificados do signatário.The CheckSignature(Boolean) method verifies the digital signatures on the signed CMS/PKCS #7 message and, optionally, validates the signers' certificates. |
| CheckSignature(X509Certificate2Collection, Boolean) |
O método CheckSignature(X509Certificate2Collection, Boolean) verifica as assinaturas digitais na mensagem CMS/PKCS #7 assinada usando a coleção de certificados especificada e, opcionalmente, valida os certificados do signatário.The CheckSignature(X509Certificate2Collection, Boolean) method verifies the digital signatures on the signed CMS/PKCS #7 message by using the specified collection of certificates and, optionally, validates the signers' certificates. |
| ComputeSignature() |
Cria uma assinatura e adiciona a assinatura à mensagem CMS/PKCS nº 7.Creates a signature and adds the signature to the CMS/PKCS #7 message. |
| ComputeSignature(CmsSigner) |
Cria uma assinatura usando o signatário especificado e adiciona a assinatura à mensagem CMS/PKCS #7.Creates a signature using the specified signer and adds the signature to the CMS/PKCS #7 message. |
| ComputeSignature(CmsSigner, Boolean) |
Cria uma assinatura usando o signatário especificado e adiciona a assinatura à mensagem CMS/PKCS #7.Creates a signature using the specified signer and adds the signature to the CMS/PKCS #7 message. |
| Decode(Byte[]) |
Decodifica uma mensagem SignedCms codificada.Decodes an encoded SignedCms message. |
| Decode(ReadOnlySpan<Byte>) | |
| Encode() |
O método Encode() codifica as informações no objeto em uma mensagem CMS/PKCS #7.The Encode() method encodes the information in the object into a CMS/PKCS #7 message. |
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| RemoveCertificate(X509Certificate2) |
Remove o certificado especificado da coleção de certificados para a mensagem do CMS/PKCS nº 7 codificada.Removes the specified certificate from the collection of certificates for the encoded CMS/PKCS #7 message. |
| RemoveSignature(Int32) |
Remove a assinatura no índice especificado da coleção SignerInfos.Removes the signature at the specified index of the SignerInfos collection. |
| RemoveSignature(SignerInfo) |
O método RemoveSignature(SignerInfo) remove a assinatura do objeto SignerInfo especificado.The RemoveSignature(SignerInfo) method removes the signature for the specified SignerInfo object. |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |