HashAlgorithmName HashAlgorithmName HashAlgorithmName HashAlgorithmName Struct

定義

指定密碼編譯雜湊演算法的名稱。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)
繼承
HashAlgorithmNameHashAlgorithmNameHashAlgorithmNameHashAlgorithmName
實作

備註

HashAlgorithmName結構包含一些傳回預先定義的雜湊演算法名稱的靜態屬性,以及Name可以表示為強型別字串的自訂雜湊演算法名稱的屬性。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.

使用 Microsoft 的 CNG (密碼編譯新一代) API 實作的非對稱演算法解譯基礎字串值視為CNG 演算法識別項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:

  • 至少必須辨識"MD5"、"SHA1"、"SHA256"、"SHA384"和"SHA512"。Must recognize at least "MD5", "SHA1", "SHA256", "SHA384", and "SHA512".

  • 應該會辨識其他的 CNG 識別碼,它們支援任何其他的雜湊演算法。Should recognize additional CNG identifiers for any additional hash algorithms that they support.

建構函式

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

使用自訂名稱初始化的新 HashAlgorithmName 結構的執行個體。Initializes a new instance of the HashAlgorithmName structure with a custom name.

屬性

MD5 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

取得代表 "SHA1" 的雜湊演算法名稱。Gets a hash algorithm name that represents "SHA1".

SHA256 SHA256 SHA256 SHA256

取得代表 "SHA256" 的雜湊演算法名稱。Gets a hash algorithm name that represents "SHA256".

SHA384 SHA384 SHA384 SHA384

取得代表 "SHA384" 的雜湊演算法名稱。Gets a hash algorithm name that represents "SHA384".

SHA512 SHA512 SHA512 SHA512

取得代表 "SHA512" 的雜湊演算法名稱。Gets a hash algorithm name that represents "SHA512".

方法

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)

傳回值,這個值表示兩個 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()

傳回目前 HashAlgorithmName 執行個體的字串表示。Returns the string representation of the current HashAlgorithmName instance.

運算子

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

判斷指定的兩個 HashAlgorithmName 物件是否相等。Determines whether two specified HashAlgorithmName objects are equal.

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

判斷指定的兩個 HashAlgorithmName 物件是否相等。Determines whether two specified HashAlgorithmName objects are not equal.

適用於