Provides an interface to hashing functions available in Node.js or external libraries.
- Source:
- See:
Members
(static) md5
- Source:
- See:
-
- module:md5
Methods
(static) digest(algo, data) → {Promise.<Uint8Array>}
Create a hash on the specified data using the specified algorithm
Parameters:
Name | Type | Description |
---|---|---|
algo |
module:enums.hash | Hash algorithm type (see RFC 4880 9.4) |
data |
Uint8Array | Data to be hashed |
- Source:
Returns:
Hash value.
- Type
- Promise.<Uint8Array>
(static) getHashByteLength(algo) → {Integer}
Returns the hash size in bytes of the specified hash algorithm type
Parameters:
Name | Type | Description |
---|---|---|
algo |
module:enums.hash | Hash algorithm type (See RFC 4880 9.4) |
- Source:
Returns:
Size in bytes of the resulting hash.
- Type
- Integer