1 out of 3 rated this helpful - Rate this topic

PackageDigitalSignatureManager Class

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

System.Object
  System.IO.Packaging.PackageDigitalSignatureManager

Namespace:  System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)
public sealed class PackageDigitalSignatureManager

The PackageDigitalSignatureManager type exposes the following members.

  Name Description
Public method PackageDigitalSignatureManager Initializes a new instance of the PackageDigitalSignatureManager class for use with a specified Package.
Top
  Name Description
Public property CertificateOption Gets or sets the X.509 certificate embedding option used by the Sign method to digitally sign package parts.
Public property Static member DefaultHashAlgorithm Gets a URI string that identifies the default hash algorithm used to create and verify signatures.
Public property HashAlgorithm Gets or sets the URI identifier for the HashAlgorithm instance used to create and verify signatures.
Public property IsSigned Gets a value that indicates whether the package contains any signatures.
Public property ParentWindow Gets or sets a handle to the parent window for displaying a certificate selection dialog box.
Public property SignatureOrigin Gets the uniform resource identifier (URI) of the signature origin part.
Public property Static member SignatureOriginRelationshipType Gets the type of default signature origin relationship.
Public property Signatures Gets a collection of all the signatures contained in the package.
Public property TimeFormat Gets or sets the date/time format used to create a signature SigningTime.
Public property TransformMapping Gets a dictionary that contains each defined ContentType and its associated XML Transform.Algorithm identifier.
Top
  Name Description
Public method Countersign() Countersigns all the signatures in the package with a user-selected X.509 certificate.
Public method Countersign(X509Certificate) Countersigns all the signatures in the package with a specified X.509 certificate.
Public method Countersign(X509Certificate, IEnumerable<Uri>) Countersigns a list of signatures with a given X.509 certificate.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetSignature Returns the digital signature for a given signature uniform resource identifier (URI). 
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RemoveAllSignatures Removes all digital signatures from the package.
Public method RemoveSignature Removes the digital signature with a given signature uniform resource identifier (URI). 
Public method Sign(IEnumerable<Uri>) Prompts the user for an X.509 certificate, which is then used to digitally sign a specified list of package parts.
Public method Sign(IEnumerable<Uri>, X509Certificate) Signs a list of package parts with a given X.509 certificate.
Public method Sign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>) Signs a list of package parts and package relationships with a given X.509 certificate.
Public method 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).
Public method 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).
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Static member VerifyCertificate Verifies a given X.509 certificate.
Public method VerifySignatures Verifies the signatures on all signed parts within the package.
Top
  Name Description
Public event InvalidSignatureEvent Occurs when VerifySignatures encounters an invalid signature.
Top

PackageDigitalSignatureManager builds on the architecture of Microsoft .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 MSDN article Digital Signing Framework of the Open Packaging Conventions available at http://go.microsoft.com/fwlink/?LinkId=74494.

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

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ