Method Hash.Crypto(+ 3 overloads)
Overload
Computes data hash using the specified cryptographic algorithm.
public static byte[] Crypto(ReadOnlySpan<byte> data, string algorithm)
Parameters
data (ReadOnlySpan<byte>) |
algorithm (string)
Algorithm name, eg |
Returns
byte[] |
Overload(next)
Computes hash of string converted to UTF-8, using the specified cryptographic algorithm.
public static byte[] Crypto(string data, string algorithm)
Parameters
data (string) |
algorithm (string)
Algorithm name, eg |
Returns
byte[] |
Overload(next)
Computes data hash using the specified cryptographic algorithm. Returns result as hex or base64 string.
public static string Crypto(ReadOnlySpan<byte> data, string algorithm, bool base64)
Parameters
data (ReadOnlySpan<byte>) |
algorithm (string)
Algorithm name, eg |
base64 (bool) |
Returns
Overload(top)
Computes hash of string converted to UTF-8, using the specified cryptographic algorithm. Returns result as hex or base64 string.
public static string Crypto(string data, string algorithm, bool base64)
Parameters
data (string) |
algorithm (string)
Algorithm name, eg |
base64 (bool) |