संपादित करें

इसके माध्यम से साझा किया गया


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
PackageDigitalSignatureManager

Examples

The following example shows how to use the PackageDigitalSignatureManager.

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.

Constructors

PackageDigitalSignatureManager(Package)

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

Properties

CertificateOption

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

DefaultHashAlgorithm

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

HashAlgorithm

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

IsSigned

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

ParentWindow

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

SignatureOrigin

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

SignatureOriginRelationshipType

Gets the type of default signature origin relationship.

Signatures

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

TimeFormat

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

TransformMapping

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

Methods

Countersign()

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

Countersign(X509Certificate, IEnumerable<Uri>)

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

Countersign(X509Certificate)

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

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetSignature(Uri)

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

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveAllSignatures()

Removes all digital signatures from the package.

RemoveSignature(Uri)

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

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).

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>)

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

Sign(IEnumerable<Uri>, X509Certificate)

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

Sign(IEnumerable<Uri>)

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

ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyCertificate(X509Certificate)

Verifies a given X.509 certificate.

VerifySignatures(Boolean)

Verifies the signatures on all signed parts within the package.

Events

InvalidSignatureEvent

Occurs when VerifySignatures(Boolean) encounters an invalid signature.

Applies to

See also