method

CryptoHasher.digest

encoding: DigestEncoding
): string;

Finalize the hash. Resets the CryptoHasher so it can be reused.

@param encoding

DigestEncoding to return the hash in

Finalize the hash and return a Buffer

hashInto: TypedArray
): TypedArray;

Finalize the hash

@param hashInto

TypedArray to write the hash into. Faster than creating a new one each time. It must hold at least byteLength bytes. shake128 and shake256 fill all of it.

Referenced types

type DigestEncoding =
| 'utf8'
| 'ucs2'
| 'utf16le'
| 'latin1'
| 'ascii'
| 'base64'
| 'base64url'
| 'hex'