PackageDigitalSignatureManager PackageDigitalSignatureManager PackageDigitalSignatureManager PackageDigitalSignatureManager Class

Definition

Provides a utility class for the creation and verification of digital signatures in a Package.

public ref class PackageDigitalSignatureManager sealed
public sealed class PackageDigitalSignatureManager
type PackageDigitalSignatureManager = class
Public NotInheritable Class PackageDigitalSignatureManager
Inheritance
PackageDigitalSignatureManagerPackageDigitalSignatureManagerPackageDigitalSignatureManagerPackageDigitalSignatureManager

Examples

The following example shows how to use the PackageDigitalSignatureManager. For the complete sample, see Creating a Package with a Digital Signature Sample.

Remarks

PackageDigitalSignatureManager builds on the architecture of .NET Framework digital signature classes and provides a utility class for performing common tasks in using digital signatures with Package elements.

For more information about package digital signatures, see the Digital Signing Framework of the Open Packaging Conventions article.

Constructors

PackageDigitalSignatureManager(Package) PackageDigitalSignatureManager(Package) PackageDigitalSignatureManager(Package) PackageDigitalSignatureManager(Package)

Initializes a new instance of the PackageDigitalSignatureManager class for use with a specified Package.

Properties

CertificateOption CertificateOption CertificateOption CertificateOption

Gets or sets the X.509 certificate embedding option used by the Sign(IEnumerable<Uri>) method to digitally sign package parts.

DefaultHashAlgorithm DefaultHashAlgorithm DefaultHashAlgorithm DefaultHashAlgorithm

Gets a URI string that identifies the default hash algorithm used to create and verify signatures.

HashAlgorithm HashAlgorithm HashAlgorithm HashAlgorithm

Gets or sets the URI identifier for the HashAlgorithm instance used to create and verify signatures.

IsSigned IsSigned IsSigned IsSigned

Gets a value that indicates whether the package contains any signatures.

ParentWindow ParentWindow ParentWindow ParentWindow

Gets or sets a handle to the parent window for displaying a certificate selection dialog box.

SignatureOrigin SignatureOrigin SignatureOrigin SignatureOrigin

Gets the uniform resource identifier (URI) of the signature origin part.

SignatureOriginRelationshipType SignatureOriginRelationshipType SignatureOriginRelationshipType SignatureOriginRelationshipType

Gets the type of default signature origin relationship.

Signatures Signatures Signatures Signatures

Gets a collection of all the signatures contained in the package.

TimeFormat TimeFormat TimeFormat TimeFormat

Gets or sets the date/time format used to create a signature SigningTime.

TransformMapping TransformMapping TransformMapping TransformMapping

Gets a dictionary that contains each defined ContentType and its associated XML Transform.Algorithm identifier.

Methods

Countersign() Countersign() Countersign() Countersign()

Countersigns all the signatures in the package with a user-selected X.509 certificate.

Countersign(X509Certificate) Countersign(X509Certificate) Countersign(X509Certificate) Countersign(X509Certificate)

Countersigns all the signatures in the package with a specified X.509 certificate.

Countersign(X509Certificate, IEnumerable<Uri>) Countersign(X509Certificate, IEnumerable<Uri>) Countersign(X509Certificate, IEnumerable<Uri>) Countersign(X509Certificate, IEnumerable<Uri>)

Countersigns a list of signatures with a given X.509 certificate.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetSignature(Uri) GetSignature(Uri) GetSignature(Uri) GetSignature(Uri)

Returns the digital signature for a given signature uniform resource identifier (URI).

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveAllSignatures() RemoveAllSignatures() RemoveAllSignatures() RemoveAllSignatures()

Removes all digital signatures from the package.

RemoveSignature(Uri) RemoveSignature(Uri) RemoveSignature(Uri) RemoveSignature(Uri)

Removes the digital signature with a given signature uniform resource identifier (URI).

Sign(IEnumerable<Uri>) Sign(IEnumerable<Uri>) Sign(IEnumerable<Uri>) Sign(IEnumerable<Uri>)

Prompts the user for an X.509 certificate, which is then used to digitally sign a specified list of package parts.

Sign(IEnumerable<Uri>, X509Certificate) Sign(IEnumerable<Uri>, X509Certificate) Sign(IEnumerable<Uri>, X509Certificate) Sign(IEnumerable<Uri>, X509Certificate)

Signs a list of package parts with a given X.509 certificate.

Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>)

Signs a list of package parts and package relationships with a given X.509 certificate.

Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String)

Signs a list of package parts and package relationships with a given X.509 certificate and identifier (ID).

Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String, IEnumerable<DataObject>, IEnumerable<Reference>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String, IEnumerable<DataObject>, IEnumerable<Reference>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String, IEnumerable<DataObject>, IEnumerable<Reference>) Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>, String, IEnumerable<DataObject>, IEnumerable<Reference>)

Signs a list of package parts, package relationships, or custom objects with a specified X.509 certificate and signature identifier (ID).

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyCertificate(X509Certificate) VerifyCertificate(X509Certificate) VerifyCertificate(X509Certificate) VerifyCertificate(X509Certificate)

Verifies a given X.509 certificate.

VerifySignatures(Boolean) VerifySignatures(Boolean) VerifySignatures(Boolean) VerifySignatures(Boolean)

Verifies the signatures on all signed parts within the package.

Events

InvalidSignatureEvent InvalidSignatureEvent InvalidSignatureEvent InvalidSignatureEvent

Occurs when VerifySignatures(Boolean) encounters an invalid signature.

Applies to

See also