Class
CmsEnvelopedDataService
OfficeIMO.Security
Creates and decrypts CMS EnvelopedData for X.509 recipients.
Inheritance
- object
- CmsEnvelopedDataService
Methods
public static CmsDecryptionResult Decrypt(byte[] encodedCms, X509Certificate2 recipientCertificate, CmsEnvelopeOptions? options = null) #Decrypts content for a matching RSA recipient certificate.
Parameters
- encodedCms byte[]
- recipientCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.CmsEnvelopeOptions? = null
Returns
CmsDecryptionResultpublic static byte[] Encrypt(byte[] content, IEnumerable<X509Certificate2> recipients, CmsEnvelopeOptions? options = null) #Encrypts content for every supplied recipient certificate.
Parameters
- content byte[]
- recipients System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>
- options OfficeIMO.Security.CmsEnvelopeOptions? = null
Returns
byte[]