API Reference
IOfficeSecurityProvider
Strongly typed cryptographic provider used by OfficeIMO document packages when security features are explicitly enabled. The contract is dependency-free; implementations such as OfficeIMO.Security may use additional cryptographic packages.
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters
- Method OfficePackageSignatureService.Sign
- Method OfficePackageSignatureService.TrySign
- Method OfficePackageSignatureService.Validate
- Method OfficePackageSignatureService.Validate
- Method OfficeVbaSignatureService.Inspect
- Method OfficeVbaSignatureService.Sign
- Method OfficeVbaSignatureService.TrySign
- Method OfficeVbaSignatureService.Validate
- Method OfficeXmlPackageSignatureService.Sign
- Method OfficeXmlPackageSignatureService.TrySign
- Method OfficeXmlPackageSignatureService.Validate
Methods
public abstract Byte[] CanonicalizeXml(Byte[] xml, String algorithm, String inclusiveNamespacesPrefixList = null, Int64 maxOutputBytes = 16777216) #Byte[]Canonicalizes a bounded XML document using an explicitly supported XML DSig algorithm.
Parameters
- xml System.Byte[]
- algorithm System.String
- inclusiveNamespacesPrefixList System.String = null
- maxOutputBytes System.Int64 = 16777216
public abstract ICmsVerificationSession CreateCmsVerificationSession(CmsVerificationOptions options) #ICmsVerificationSessionCreates a bounded CMS verification session whose aggregate timestamp limits are shared across every verification performed by that session.
Parameters
- options OfficeIMO.Security.CmsVerificationOptions
public abstract Byte[] CreateXmlSignature(XmlDigitalSignatureCreationRequest request) #Byte[]Creates one bounded enveloping XML signature.
Parameters
- request OfficeIMO.Security.XmlDigitalSignatureCreationRequest
public abstract CmsDecryptionResult DecryptCms(Byte[] encodedCms, X509Certificate2 recipientCertificate, CmsEnvelopeOptions options = null) #CmsDecryptionResultDecrypts CMS EnvelopedData for a matching recipient certificate.
Parameters
- encodedCms System.Byte[]
- recipientCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.CmsEnvelopeOptions = null
public abstract Byte[] EncryptCms(Byte[] content, IEnumerable<X509Certificate2> recipients, CmsEnvelopeOptions options = null) #Byte[]Creates CMS EnvelopedData for the supplied recipients.
Parameters
- content System.Byte[]
- recipients System.Collections.Generic.IEnumerable{System.Security.Cryptography.X509Certificates.X509Certificate2}
- options OfficeIMO.Security.CmsEnvelopeOptions = null
public abstract Byte[] NormalizeAsn1Object(Byte[] encoded, Boolean allowTrailingZeroPadding, Int64 maxEncodedBytes) #Byte[]Normalizes one bounded DER/BER object, optionally trimming PDF-style trailing zero padding.
Parameters
- encoded System.Byte[]
- allowTrailingZeroPadding System.Boolean
- maxEncodedBytes System.Int64
public abstract Byte[] SignCmsDetached(Byte[] content, X509Certificate2 signingCertificate, CmsSigningOptions options = null, IEnumerable<X509Certificate2> certificateChain = null) #Byte[]Creates detached CMS SignedData over the exact supplied content.
Parameters
- content System.Byte[]
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.CmsSigningOptions = null
- certificateChain System.Collections.Generic.IEnumerable{System.Security.Cryptography.X509Certificates.X509Certificate2} = null
public abstract Byte[] SignCmsEncapsulated(Byte[] content, X509Certificate2 signingCertificate, CmsSigningOptions options = null, IEnumerable<X509Certificate2> certificateChain = null) #Byte[]Creates encapsulated CMS SignedData containing the supplied content.
Parameters
- content System.Byte[]
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.CmsSigningOptions = null
- certificateChain System.Collections.Generic.IEnumerable{System.Security.Cryptography.X509Certificates.X509Certificate2} = null
public abstract CertificateTrustValidationResult ValidateCertificate(X509Certificate2 certificate, IEnumerable<X509Certificate2> additionalCertificates = null, CertificateValidationOptions options = null, CertificateValidationPurpose purpose = DocumentSigning) #CertificateTrustValidationResultValidates certificate trust, revocation, and intended usage under caller policy.
Parameters
- certificate System.Security.Cryptography.X509Certificates.X509Certificate2
- additionalCertificates System.Collections.Generic.IEnumerable{System.Security.Cryptography.X509Certificates.X509Certificate2} = null
- options OfficeIMO.Security.CertificateValidationOptions = null
- purpose OfficeIMO.Security.CertificateValidationPurpose = DocumentSigning
public abstract CmsVerificationResult VerifyCms(Byte[] encodedCms, CmsVerificationOptions options = null, CertificateValidationPurpose signerCertificatePurpose = DocumentSigning) #CmsVerificationResultVerifies encapsulated CMS SignedData.
Parameters
- encodedCms System.Byte[]
- options OfficeIMO.Security.CmsVerificationOptions = null
- signerCertificatePurpose OfficeIMO.Security.CertificateValidationPurpose = DocumentSigning
public abstract CmsVerificationResult VerifyCmsDetached(Byte[] encodedCms, Byte[] detachedContent, CmsVerificationOptions options = null, CertificateValidationPurpose signerCertificatePurpose = DocumentSigning) #CmsVerificationResultVerifies detached CMS SignedData against the exact supplied content.
Parameters
- encodedCms System.Byte[]
- detachedContent System.Byte[]
- options OfficeIMO.Security.CmsVerificationOptions = null
- signerCertificatePurpose OfficeIMO.Security.CertificateValidationPurpose = DocumentSigning
public abstract Rfc3161TimestampVerificationResult VerifyTimestamp(Byte[] encodedToken, Byte[] timestampedData, CertificateValidationOptions certificateOptions = null, Int64 maxEncodedBytes = 16777216, Int32 maxCertificates = 64) #Rfc3161TimestampVerificationResultVerifies an RFC 3161 timestamp token against the exact timestamped bytes.
Parameters
- encodedToken System.Byte[]
- timestampedData System.Byte[]
- certificateOptions OfficeIMO.Security.CertificateValidationOptions = null
- maxEncodedBytes System.Int64 = 16777216
- maxCertificates System.Int32 = 64
public abstract XmlDigitalSignatureVerificationResult VerifyXmlSignature(XmlDigitalSignatureVerificationRequest request) #XmlDigitalSignatureVerificationResultVerifies XML signature math and bounded local-reference processing independently of trust.
Parameters
- request OfficeIMO.Security.XmlDigitalSignatureVerificationRequest
Properties
public abstract String Name { get; } #Gets a stable provider name for diagnostics.