digest

Bun

Symbol

CryptoHasher.digest

digest(encoding: DigestEncoding): string

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

@param encoding

DigestEncoding to return the hash in. If none is provided, it will return a Uint8Array.

digest(): Buffer

Finalize the hash and return a Buffer

digest(hashInto: TypedArray): TypedArray

Finalize the hash

@param hashInto

TypedArray to write the hash into. Faster than creating a new one each time

Referenced types

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