Skip to main content

Interface: HashObj

Methods

bytes()

bytes(): Uint8Array

Finalize the hash and return the raw digest bytes.

Returns

Uint8Array


digest()

digest(): string

Finalize the hash and return it as a lowercase hex string.

Returns

string


update()

update(data): HashObj

Feed more data into the hash. Can be called repeatedly to hash data incrementally. Accepts a string (UTF-8 encoded) or raw bytes. Returns the same object so calls can be chained.

Parameters

data

string | Uint8Array<ArrayBufferLike>

Returns

HashObj