Прочетете на английски Редактиране

Споделяне чрез


PackageDigitalSignatureManager.DefaultHashAlgorithm Property

Definition

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

C#
public static string DefaultHashAlgorithm { get; }

Property Value

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

Remarks

The default hash algorithm for the standard PackageDigitalSignatureManager class is XmlDsigSHA1Url (Secure Hash Algorithm version 1.0 (SHA1)).

The HashAlgorithm property gets or sets the actual hash algorithm this is used to create and verify signatures.

The DefaultHashAlgorithm property is typically used to reset the HashAlgorithm property back to default after a temporary change.

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

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also