Show / Hide Table of Contents

Method Hash.MD5(+ 3 overloads)


Overload

Computes MD5 hash of data. Uses Hash.MD5Context.

public static Hash.MD5Result MD5(ReadOnlySpan<byte> data)
Parameters
data  (ReadOnlySpan<byte>)

Data. See also: System.Runtime.InteropServices.MemoryMarshal.AsBytes<T>, System.Runtime.InteropServices.CollectionsMarshal.AsSpan<T>.

Returns
Hash.MD5Result

Overload(next)

Computes MD5 hash of string converted to UTF-8. Uses Hash.MD5Context.

public static Hash.MD5Result MD5(string data)
Parameters
data  (string)
Returns
Hash.MD5Result

Overload(next)

Computes MD5 hash of data. Returns result as hex or base64 string. Uses Hash.MD5Context.

public static string MD5(ReadOnlySpan<byte> data, bool base64)
Parameters
data  (ReadOnlySpan<byte>)

Data. See also: System.Runtime.InteropServices.MemoryMarshal.AsBytes<T>, System.Runtime.InteropServices.CollectionsMarshal.AsSpan<T>.

base64  (bool)
Returns
string

Overload(top)

Computes MD5 hash of string converted to UTF-8. Returns result as hex or base64 string. Uses Hash.MD5Context.

public static string MD5(string data, bool base64)
Parameters
data  (string)
base64  (bool)
Returns
string