SHA2-512 for deno
.
import { sha512 } from "https://denopkg.com/chiefbiiko/sha512/mod.ts";
console.log('SHA2-512 of ""', sha512("", "utf8", "hex"))
Creates a new SHA2-512 instance.
Initializes a hash instance.
Updates a hash with additional data. inputEncoding
can be one of "utf8"
, "hex"
, or "base64"
.
Get a hash digest. outputEncoding
can be one of "utf8"
, "hex"
, or "base64"
. If it is omitted a Uint8Array
is returned.
sha512(msg: string | Uint8Array, inputEncoding?: string, outputEncoding?: string): string | Uint8Array
Convenience function for hashing singular data.