This topic has not yet been rated - 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.

  NameDescription
Public methodPackageDigitalSignatureManagerInitializes a new instance of the PackageDigitalSignatureManager class for use with a specified Package.
Top
  NameDescription
Public propertyCertificateOptionGets or sets the X.509 certificate embedding option used by the Sign method to digitally sign package parts.
Public propertyStatic memberDefaultHashAlgorithmGets a URI string that identifies the default hash algorithm used to create and verify signatures.
Public propertyHashAlgorithmGets or sets the URI identifier for the HashAlgorithm instance used to create and verify signatures.
Public propertyIsSignedGets a value that indicates whether the package contains any signatures.
Public propertyParentWindowGets or sets a handle to the parent window for displaying a certificate selection dialog box.
Public propertySignatureOriginGets the uniform resource identifier (URI) of the signature origin part.
Public propertyStatic memberSignatureOriginRelationshipTypeGets the type of default signature origin relationship.
Public propertySignaturesGets a collection of all the signatures contained in the package.
Public propertyTimeFormatGets or sets the date/time format used to create a signature SigningTime.
Public propertyTransformMappingGets a dictionary that contains each defined ContentType and its associated XML Transform.Algorithm identifier.
Top
  NameDescription
Public methodCountersign()Countersigns all the signatures in the package with a user-selected X.509 certificate.
Public methodCountersign(X509Certificate)Countersigns all the signatures in the package with a specified X.509 certificate.
Public methodCountersign(X509Certificate, IEnumerable<Uri>)Countersigns a list of signatures with a given X.509 certificate.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetSignatureReturns the digital signature for a given signature uniform resource identifier (URI). 
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodRemoveAllSignaturesRemoves all digital signatures from the package.
Public methodRemoveSignatureRemoves the digital signature with a given signature uniform resource identifier (URI). 
Public methodSign(IEnumerable<Uri>)Prompts the user for an X.509 certificate, which is then used to digitally sign a specified list of package parts.
Public methodSign(IEnumerable<Uri>, X509Certificate)Signs a list of package parts with a given X.509 certificate.
Public methodSign(IEnumerable<Uri>, X509Certificate, IEnumerable<PackageRelationshipSelector>)Signs a list of package parts and package relationships with a given X.509 certificate.
Public methodSign(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 methodSign(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 methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodStatic memberVerifyCertificateVerifies a given X.509 certificate.
Public methodVerifySignaturesVerifies the signatures on all signed parts within the package.
Top
  NameDescription
Public eventInvalidSignatureEventOccurs 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.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.