C# Класс MimeKit.Cryptography.MultipartSigned

A signed multipart, as used by both S/MIME and PGP/MIME protocols.
The first child of a multipart/signed is the content while the second child is the detached signature data. Any other children are not defined and could be anything.
Наследование: Multipart
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Accept ( MimeVisitor visitor ) : void

Dispatches to the specific visit method for this MIME entity.

This default implementation for MimeKit.Cryptography.MultipartSigned nodes calls MimeKit.MimeVisitor.VisitMultipartSigned. Override this method to call into a more specific method on a derived visitor class of the MimeKit.MimeVisitor class. However, it should still support unknown visitors by calling MimeKit.MimeVisitor.VisitMultipartSigned.

Create ( CmsSigner signer, MimeEntity entity ) : MultipartSigned

Creates a new MultipartSigned.

Cryptographically signs the entity using the supplied signer in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.

Create ( MimeKit.Cryptography.CryptographyContext ctx, MailboxAddress signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned

Creates a new MultipartSigned.

Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.

Create ( MimeKit.Cryptography.OpenPgpContext ctx, PgpSecretKey signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned

Creates a new MultipartSigned.

Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.

Create ( PgpSecretKey signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned

Creates a new MultipartSigned.

Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.

Create ( MimeKit.Cryptography.SecureMimeContext ctx, CmsSigner signer, MimeEntity entity ) : MultipartSigned

Creates a new MultipartSigned.

Cryptographically signs the entity using the supplied signer in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.

MultipartSigned ( ) : System

Initializes a new instance of the MimeKit.Cryptography.MultipartSigned class.

Creates a new MultipartSigned.

MultipartSigned ( MimeEntityConstructorArgs args ) : System

Initializes a new instance of the MimeKit.Cryptography.MultipartSigned class.

This constructor is used by MimeKit.MimeParser.

Prepare ( EncodingConstraint constraint, int maxLineLength = 78 ) : void

Prepare the MIME entity for transport using the specified encoding constraints.

Prepares the MIME entity for transport using the specified encoding constraints.

Verify ( ) : DigitalSignatureCollection

Verifies the multipart/signed part.

Verifies the multipart/signed part using the default cryptography context.

Verify ( MimeKit.Cryptography.CryptographyContext ctx ) : DigitalSignatureCollection

Verifies the multipart/signed part.

Verifies the multipart/signed part using the supplied cryptography context.

Описание методов

Accept() публичный Метод

Dispatches to the specific visit method for this MIME entity.
This default implementation for MimeKit.Cryptography.MultipartSigned nodes calls MimeKit.MimeVisitor.VisitMultipartSigned. Override this method to call into a more specific method on a derived visitor class of the MimeKit.MimeVisitor class. However, it should still support unknown visitors by calling MimeKit.MimeVisitor.VisitMultipartSigned.
/// is null. ///
public Accept ( MimeVisitor visitor ) : void
visitor MimeVisitor The visitor.
Результат void

Create() публичный статический Метод

Creates a new MultipartSigned.
Cryptographically signs the entity using the supplied signer in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.
/// is null. /// -or- /// is null. /// /// A cryptography context suitable for signing could not be found. /// /// An error occurred in the cryptographic message syntax subsystem. ///
public static Create ( CmsSigner signer, MimeEntity entity ) : MultipartSigned
signer CmsSigner The signer.
entity MimeEntity The entity to sign.
Результат MultipartSigned

Create() публичный статический Метод

Creates a new MultipartSigned.
Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.
/// is null. /// -or- /// is null. /// -or- /// is null. /// /// The was out of range. /// /// The is not supported. /// /// A signing certificate could not be found for . /// /// The private key could not be found for . /// /// An error occurred in the cryptographic message syntax subsystem. ///
public static Create ( MimeKit.Cryptography.CryptographyContext ctx, MailboxAddress signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned
ctx MimeKit.Cryptography.CryptographyContext The cryptography context to use for signing.
signer MailboxAddress The signer.
digestAlgo DigestAlgorithm The digest algorithm to use for signing.
entity MimeEntity The entity to sign.
Результат MultipartSigned

Create() публичный статический Метод

Creates a new MultipartSigned.
Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.
/// is null. /// -or- /// is null. /// -or- /// is null. /// /// cannot be used for signing. /// /// The was out of range. /// /// The is not supported. /// /// An error occurred in the OpenPGP subsystem. ///
public static Create ( MimeKit.Cryptography.OpenPgpContext ctx, PgpSecretKey signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned
ctx MimeKit.Cryptography.OpenPgpContext The OpenPGP context to use for signing.
signer Org.BouncyCastle.Bcpg.OpenPgp.PgpSecretKey The signer.
digestAlgo DigestAlgorithm The digest algorithm to use for signing.
entity MimeEntity The entity to sign.
Результат MultipartSigned

Create() публичный статический Метод

Creates a new MultipartSigned.
Cryptographically signs the entity using the supplied signer and digest algorithm in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.
/// is null. /// -or- /// is null. /// /// cannot be used for signing. /// /// The was out of range. /// /// A cryptography context suitable for signing could not be found. /// -or- /// The is not supported. /// /// An error occurred in the OpenPGP subsystem. ///
public static Create ( PgpSecretKey signer, DigestAlgorithm digestAlgo, MimeEntity entity ) : MultipartSigned
signer Org.BouncyCastle.Bcpg.OpenPgp.PgpSecretKey The signer.
digestAlgo DigestAlgorithm The digest algorithm to use for signing.
entity MimeEntity The entity to sign.
Результат MultipartSigned

Create() публичный статический Метод

Creates a new MultipartSigned.
Cryptographically signs the entity using the supplied signer in order to generate a detached signature and then adds the entity along with the detached signature data to a new multipart/signed part.
/// is null. /// -or- /// is null. /// -or- /// is null. /// /// An error occurred in the cryptographic message syntax subsystem. ///
public static Create ( MimeKit.Cryptography.SecureMimeContext ctx, CmsSigner signer, MimeEntity entity ) : MultipartSigned
ctx MimeKit.Cryptography.SecureMimeContext The S/MIME context to use for signing.
signer CmsSigner The signer.
entity MimeEntity The entity to sign.
Результат MultipartSigned

MultipartSigned() публичный Метод

Initializes a new instance of the MimeKit.Cryptography.MultipartSigned class.
Creates a new MultipartSigned.
public MultipartSigned ( ) : System
Результат System

MultipartSigned() публичный Метод

Initializes a new instance of the MimeKit.Cryptography.MultipartSigned class.
This constructor is used by MimeKit.MimeParser.
/// is null. ///
public MultipartSigned ( MimeEntityConstructorArgs args ) : System
args MimeEntityConstructorArgs Information used by the constructor.
Результат System

Prepare() публичный Метод

Prepare the MIME entity for transport using the specified encoding constraints.
Prepares the MIME entity for transport using the specified encoding constraints.
/// is not between 60 and 998 (inclusive). /// -or- /// is not a valid value. ///
public Prepare ( EncodingConstraint constraint, int maxLineLength = 78 ) : void
constraint EncodingConstraint The encoding constraint.
maxLineLength int The maximum number of octets allowed per line (not counting the CRLF). Must be between 60 and 998 (inclusive).
Результат void

Verify() публичный Метод

Verifies the multipart/signed part.
Verifies the multipart/signed part using the default cryptography context.
/// The protocol parameter was not specified. /// -or- /// The multipart is malformed in some way. /// /// A cryptography context suitable for verifying the signature could not be found. /// /// An error occurred in the cryptographic message syntax subsystem. ///
public Verify ( ) : DigitalSignatureCollection
Результат DigitalSignatureCollection

Verify() публичный Метод

Verifies the multipart/signed part.
Verifies the multipart/signed part using the supplied cryptography context.
/// is null. /// /// The multipart is malformed in some way. /// /// does not support verifying the signature part. /// /// An error occurred in the cryptographic message syntax subsystem. ///
public Verify ( MimeKit.Cryptography.CryptographyContext ctx ) : DigitalSignatureCollection
ctx MimeKit.Cryptography.CryptographyContext The cryptography context to use for verifying the signature.
Результат DigitalSignatureCollection