Appearance
GetHash Method
Definition
- Namespace:
JASE - Assembly:
JASE.dll
Overloads
| Name | Description |
|---|---|
byte[] GetHash(byte[] input, HashProvider? provider = null, int loop = null) | Computes a hash over the specified byte array using the requested provider. |
byte[] GetHash(object input, HashProvider? provider = null, int loop = null) | Computes a hash over the JSON-serialized representation of the specified object. |
byte[] GetHash(string input, HashProvider? provider = null, int loop = null) | Computes a hash over the specified string using the requested provider. |
byte[] GetHash(byte[] input, HashProvider? provider = null, int loop = null)
csharp
byte[] GetHash(byte[] input, HashProvider? provider = null, int loop = null)Computes a hash over the specified byte array using the requested provider.
Parameters
| Name | Description |
|---|---|
input | The input bytes to hash. |
loop | Optional number of additional iterations to hash the result. Provided for legacy compatibility. |
provider | The hash provider to use. Defaults to DefaultHashalgorithm if null. |
Returns
The hash bytes.
byte[] GetHash(object input, HashProvider? provider = null, int loop = null)
csharp
byte[] GetHash(object input, HashProvider? provider = null, int loop = null)Computes a hash over the JSON-serialized representation of the specified object.
Parameters
| Name | Description |
|---|---|
input | The object to hash. It will be serialized to UTF-8 JSON. |
loop | Optional number of additional iterations to hash the result. A value greater than zero recomputes the hash over its own output loop times. Provided for legacy compatibility and should generally be left at 0. |
provider | The hash provider to use. Defaults to DefaultHashalgorithm if null. |
Returns
The hash bytes.
byte[] GetHash(string input, HashProvider? provider = null, int loop = null)
csharp
byte[] GetHash(string input, HashProvider? provider = null, int loop = null)Computes a hash over the specified string using the requested provider.
Parameters
| Name | Description |
|---|---|
input | The input text to hash. |
loop | Optional number of additional iterations to hash the result. Provided for legacy compatibility. |
provider | The hash provider to use. Defaults to DefaultHashalgorithm if null. |
Returns
The hash bytes.