Creates an instance of Hasher.
The output length of the hash in bytes. Default is 32.
The personal string for the Blake2b algorithm. Default is CKB_BLAKE2B_PERSONAL.
Updates the hash with the given data.
The data to update the hash with.
The current Hasher instance for chaining.
const hasher = new Hasher();hasher.update("some data").update("more data");const hash = hasher.digest(); Copy
const hasher = new Hasher();hasher.update("some data").update("more data");const hash = hasher.digest();
Finalizes the hash and returns the digest as a hexadecimal string.
The hexadecimal string representation of the hash.
const hasher = new Hasher();hasher.update("some data");const hash = hasher.digest(); // Outputs something like "0x..." Copy
const hasher = new Hasher();hasher.update("some data");const hash = hasher.digest(); // Outputs something like "0x..."
Creates an instance of Hasher.