SHA2-256 for deno
.
import { sha256 } from "https://denopkg.com/chiefbiiko/sha256@v1.0.0/mod.ts";
console.log('SHA2-256 of ""', sha256("", "utf8", "hex"))
Creates a new SHA2-256 instance.
Initializes a hash instance.
Updates a hash with additional data. inputEncoding
can be one of "utf8"
, "hex"
, or "base64"
.
Finalizes the hash. outputEncoding
can be one of "utf8"
, "hex"
, or "base64"
. If it is omitted a Uint8Array
is returned.
Convenience function for hashing singular data.