Sha256
import { Sha256 } from "https://raw.githubusercontent.com/marigold-dev/tzstamp/0.3.4/helpers/mod.ts";
SHA-256 streaming hash function.
const message = new TextEncoder().encode("hello");
const hash = new Sha256();
hash.update(message);
hash.finalized; // false
hash.digest(); // Uint8Array(32)
hash.finalized; // true
class Sha256 { }
constructor();
private buffer: ArrayBuffer;
private counter: number;
private final: boolean;
private size: bigint;
private state: ArrayBuffer;
get finalized(): boolean;
private compress(): void;
digest(): Uint8Array;
update(input: Uint8Array): this;
static digest(input: Uint8Array): Uint8Array;