Condividi tramite


Crypto.Hash Metodo

Definizione

Overload

Hash(Byte[], String)

Restituisce un valore hash per la matrice di byte specificata.

Hash(String, String)

Restituisce un valore hash per la stringa specificata.

Hash(Byte[], String)

Restituisce un valore hash per la matrice di byte specificata.

public static string Hash(byte[] input, string algorithm = "sha256");
static member Hash : byte[] * string -> string
Public Shared Function Hash (input As Byte(), Optional algorithm As String = "sha256") As String

Parametri

input
Byte[]

Dati per i quali fornire un valore hash.

algorithm
String

Algoritmo utilizzato per generare il valore hash. Il valore predefinito è "sha256".

Restituisce

Valore hash per input come stringa di caratteri esadecimali.

Eccezioni

input è null.

Si applica a

Hash(String, String)

Restituisce un valore hash per la stringa specificata.

public static string Hash(string input, string algorithm = "sha256");
static member Hash : string * string -> string
Public Shared Function Hash (input As String, Optional algorithm As String = "sha256") As String

Parametri

input
String

Dati per i quali fornire un valore hash.

algorithm
String

Algoritmo utilizzato per generare il valore hash. Il valore predefinito è "sha256".

Restituisce

Valore hash per input come stringa di caratteri esadecimali.

Eccezioni

input è null.

Si applica a