Module sha/sha_384
source · [−]Expand description
Code related to SHA_384
Functions
sourcedigest
digest
source(data: BufferSource): Promise<Sha384ArrayBuffer>
(data: BufferSource): Promise<Sha384ArrayBuffer>
Get the digest of the buffer
example
const buffer = new TextEncoder().encode("a file");
const digest = SHA_384.digest(buffer);
Parameters
data: BufferSource
Returns Promise<Sha384ArrayBuffer>
sourcehexify
hexify
source(digest: Sha384ArrayBuffer): string
(digest: Sha384ArrayBuffer): string
Get the hex string of the digest
example
const hash = SHA_384.hexify(digest);
Parameters
digest: Sha384ArrayBuffer