HashAlgorithmName HashAlgorithmName HashAlgorithmName HashAlgorithmName Struct

Definition

Specifies the name of a cryptographic hash algorithm.

public value class HashAlgorithmName : IEquatable<System::Security::Cryptography::HashAlgorithmName>
public struct HashAlgorithmName : IEquatable<System.Security.Cryptography.HashAlgorithmName>
type HashAlgorithmName = struct
Public Structure HashAlgorithmName
Implements IEquatable(Of HashAlgorithmName)
Inheritance
HashAlgorithmNameHashAlgorithmNameHashAlgorithmNameHashAlgorithmName
Implements

Remarks

The HashAlgorithmName structure includes some static properties that return predefined hash algorithm names, as well as a Name 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 a CNG algorithm identifier.

Asymmetric algorithms implemented using other technologies:

  • Must recognize at least "MD5", "SHA1", "SHA256", "SHA384", and "SHA512".

  • Should recognize additional CNG identifiers for any additional hash algorithms that they support.

Constructors

HashAlgorithmName(String) HashAlgorithmName(String) HashAlgorithmName(String) HashAlgorithmName(String)

Initializes a new instance of the HashAlgorithmName structure with a custom name.

Properties

MD5 MD5 MD5 MD5

Gets a hash algorithm name that represents "MD5".

Name Name Name Name

Gets the underlying string representation of the algorithm name.

SHA1 SHA1 SHA1 SHA1

Gets a hash algorithm name that represents "SHA1".

SHA256 SHA256 SHA256 SHA256

Gets a hash algorithm name that represents "SHA256".

SHA384 SHA384 SHA384 SHA384

Gets a hash algorithm name that represents "SHA384".

SHA512 SHA512 SHA512 SHA512

Gets a hash algorithm name that represents "SHA512".

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Returns a value that indicates whether the current instance and a specified object are equal.

Equals(HashAlgorithmName) Equals(HashAlgorithmName) Equals(HashAlgorithmName) Equals(HashAlgorithmName)

Returns a value that indicates whether two HashAlgorithmName instances are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for the current instance.

ToString() ToString() ToString() ToString()

Returns the string representation of the current HashAlgorithmName instance.

Operators

Equality(HashAlgorithmName, HashAlgorithmName) Equality(HashAlgorithmName, HashAlgorithmName) Equality(HashAlgorithmName, HashAlgorithmName) Equality(HashAlgorithmName, HashAlgorithmName)

Determines whether two specified HashAlgorithmName objects are equal.

Inequality(HashAlgorithmName, HashAlgorithmName) Inequality(HashAlgorithmName, HashAlgorithmName) Inequality(HashAlgorithmName, HashAlgorithmName) Inequality(HashAlgorithmName, HashAlgorithmName)

Determines whether two specified HashAlgorithmName objects are not equal.

Applies to