import { Sha256 } from "https://deno.land/x/dtils@2.3.1/mod.ts";
A utility for creating an Sha256 hash from a string or Uint8Array.
await Sha256.hash("Hello!") // 334d016f755cd6dc58c53a86e183882f8ec14f52fb05345887c8a5edd42c87b7
Incremental hashing is also supported:
const sha = new Sha256()
sha.append("Hello")
sha.append("World!")
sha.get() // d5c49b74a17cc9fbedf02aec7f3f87bdeab2ab5233ac7ef49a8bbb66ce77f8f4
Static Methods
hash(contents: Uint8Array | string): Promise<string>