This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the name of a cryptographic hash algorithm.
public value class HashAlgorithmName : IEquatable<System::Security::Cryptography::HashAlgorithmName>public readonly struct HashAlgorithmName : IEquatable<System.Security.Cryptography.HashAlgorithmName>public struct HashAlgorithmName : IEquatable<System.Security.Cryptography.HashAlgorithmName>type HashAlgorithmName = structPublic Structure HashAlgorithmNameImplements IEquatable(Of HashAlgorithmName)TheHashAlgorithmName structure includes some static properties that return predefined hash algorithm names, as well as aName property that can represent a custom hash algorithm name as a strongly-typed string. Hash algorithm names are case-sensitive.
Asymmetric algorithms implemented using Microsoft's CNG (Cryptographic Next Generation) API interpret the underlying string value as aCNG algorithm identifier.
Asymmetric algorithms implemented using other technologies:
Due to collision problems with MD5 and SHA-1, Microsoft recommends a security model based on SHA-256 or better.
| Name | Description |
|---|---|
| HashAlgorithmName(String) | Initializes a new instance of theHashAlgorithmName structure with a custom name. |
| Name | Description |
|---|---|
| MD5 | Gets a hash algorithm name that represents "MD5". |
| Name | Gets the underlying string representation of the algorithm name. |
| SHA1 | Gets a hash algorithm name that represents "SHA1". |
| SHA256 | Gets a hash algorithm name that represents "SHA256". |
| SHA3_256 | Gets aHashAlgorithmName representing "SHA3-256" |
| SHA3_384 | Gets aHashAlgorithmName representing "SHA3-384" |
| SHA3_512 | Gets aHashAlgorithmName representing "SHA3-512" |
| SHA384 | Gets a hash algorithm name that represents "SHA384". |
| SHA512 | Gets a hash algorithm name that represents "SHA512". |
| Name | Description |
|---|---|
| Equals(HashAlgorithmName) | Returns a value that indicates whether twoHashAlgorithmName instances are equal. |
| Equals(Object) | Returns a value that indicates whether the current instance and a specified object are equal. |
| FromOid(String) | Converts the specified OID to a hash algorithm name. |
| GetHashCode() | Returns the hash code for the current instance. |
| ToString() | Returns the string representation of the currentHashAlgorithmName instance. |
| TryFromOid(String, HashAlgorithmName) | Tries to convert the specified OID to a hash algorithm name. |
| Name | Description |
|---|---|
| Equality(HashAlgorithmName, HashAlgorithmName) | Determines whether two specifiedHashAlgorithmName objects are equal. |
| Inequality(HashAlgorithmName, HashAlgorithmName) | Determines whether two specifiedHashAlgorithmName objects are not equal. |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?