Редагувати

Поділитися через


PackageDigitalSignatureManager.HashAlgorithm Property

Definition

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

public:
 property System::String ^ HashAlgorithm { System::String ^ get(); void set(System::String ^ value); };
public string HashAlgorithm { get; set; }
member this.HashAlgorithm : string with get, set
Public Property HashAlgorithm As String

Property Value

The SignedXml URI identifier for the HashAlgorithm instance used to create and verify signatures.

Exceptions

The string for the URI to set is null.

The string for the URI to set is empty.

Remarks

The default hash algorithm identifier for the standard digital signature manager is XmlDsigSHA1Url (SHA1 - Secure Hash Algorithm version 1.0).

Unless explicitly set otherwise, this property gets the same value as DefaultHashAlgorithm.

The HashAlgorithm property is typically not changed from its default. This property must be changed only if a signature that uses a different known and accessible HashAlgorithm is encountered. When finished with the signature that uses a different hash algorithm, call DefaultHashAlgorithm to reset the HashAlgorithm property back to default.

Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.

Applies to

See also