new $k.Hash()
Methods
digest(encoding) : string
Calculates the digest of the data passed to this object.
Name | Type | Description |
---|---|---|
encoding |
string |
optional
Optional encoding of the output. |
- Version:
- Experimental feature, might be removed at any time
Returns:
Type | Description |
---|---|
string | If no encoding is given, an array of integers is returned, otherwise a string with the given encoding. |
hash(data, inputEncoding, outputEncoding) : string
Hashes the given data. This is a shorthand for calling reset, update and digest and changes the object state.
Name | Type | Description |
---|---|---|
data |
string |
The data to hash. |
inputEncoding |
string |
optional
Optional input encoding. |
outputEncoding |
string |
optional
Optional output encoding. |
- Version:
- Experimental feature, might be removed at any time
Returns:
Type | Description |
---|---|
string | The hashed data as array of integers. |