Class HashUtility
This utility class is designed to make System.Security.Cryptography.HashAlgorithm operations easier to work with.
Inheritance
Namespace: Cuemon.Security.Cryptography
Assembly: Cuemon.Security.dll
Syntax
public static class HashUtility
Methods
| Improve this DocComputeHash(Byte[], Action<HashOptions>)
Computes a hash value of the specified value
.
Declaration
public static HashResult ComputeHash(byte[] value, Action<HashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | The System.Byte array to compute a hash code for. |
System.Action<HashOptions> | setup | The HashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified |
ComputeHash(Stream, Action<StreamHashOptions>)
Computes a hash value of the specified value
.
Declaration
public static HashResult ComputeHash(Stream value, Action<StreamHashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The System.IO.Stream to compute a hash code for. |
System.Action<StreamHashOptions> | setup | The StreamHashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified |
ComputeHash(Object, Action<HashOptions>)
Computes a hash value of the specified value
.
Declaration
public static HashResult ComputeHash(object value, Action<HashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to compute a hash code for. |
System.Action<HashOptions> | setup | The HashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified |
ComputeHash(Object[], Action<HashOptions>)
Combines a sequence of objects into one object, and computes a hash value of the specified values
.
Declaration
public static HashResult ComputeHash(object[] values, Action<HashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | values | The objects to compute a hash code for. |
System.Action<HashOptions> | setup | The HashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified object sequence |
ComputeHash(String, Action<StringHashOptions>)
Computes a hash value of the specified value
.
Declaration
public static HashResult ComputeHash(string value, Action<StringHashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The System.String to compute a hash code for. |
System.Action<StringHashOptions> | setup | The StringHashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified |
ComputeHash(String[], Action<StringHashOptions>)
Computes a hash value of the specified values
.
Declaration
public static HashResult ComputeHash(string[] values, Action<StringHashOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | values | The System.String array to compute a hash code for. |
System.Action<StringHashOptions> | setup | The StringHashOptions which need to be configured. |
Returns
Type | Description |
---|---|
HashResult | A HashResult containing the computed hash value of the specified |