CryptoHash
Methods
digest
Returns the finalized hash value.
If the hash object was created with a key, this would close the object.
:digest(): buffer
:digest(encoding: "binary"): buffer
:digest(encoding: "hex" | "base64"): string
:digest(encoding: string): string | bufferParameters
encoding: "binary" | "hex" | "base64" | string?- The encoding of the output.- default:
"binary"
- default:
Throws
- Memory Error
update
:update(value: string | buffer): ()Parameters
value: string | buffer- The value to update the hash with.
Throws
- Crypto Error
copy
Copies the current hash state.
If the hash object was created with a key, the object must still be opened.
:copy(): CryptoHashThrows
- Crypto Error
- Memory Error
Last updated on