Expand description
Code related to SHA_1
Functions
sourcedigest
digest
source(data: BufferSource): Promise<Sha1ArrayBuffer>
(data: BufferSource): Promise<Sha1ArrayBuffer>
Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_1.digest(buffer);
Parameters
data: BufferSource
Returns Promise<Sha1ArrayBuffer>
sourcehexify
hexify
source(digest: Sha1ArrayBuffer): string
(digest: Sha1ArrayBuffer): string
Get the hex string of the digest
example
const hash = SHA_1.hexify(digest);
Parameters
digest: Sha1ArrayBuffer