|  | Multipart | 
 Syntax
Syntaxpublic static Task<MultipartEncrypted> SignAndEncryptAsync( MailboxAddress signer, DigestAlgorithm digestAlgo, IEnumerable<MailboxAddress> recipients, MimeEntity entity, CancellationToken cancellationToken = default )
 Exceptions
Exceptions| Exception | Condition | 
|---|---|
| ArgumentNullException | signer is . -or- recipients is . -or- entity is . | 
| NotSupportedException | A default OpenPgpContext has not been registered. | 
| PrivateKeyNotFoundException | The private key for signer could not be found. | 
| PublicKeyNotFoundException | A public key for one or more of the recipients could not be found. | 
| ObjectDisposedException | entity has been disposed. | 
| OperationCanceledException | The user chose to cancel the password prompt. | 
| UnauthorizedAccessException | 3 bad attempts were made to unlock the secret key. | 
 Remarks
Remarks See Also
See Also