Mdigest
Bun

method

SHA256.digest

encoding: DigestEncoding
): string;

Finalize the hash

@param encoding

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

hashInto?: TypedArray<ArrayBufferLike>
): 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'