// from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest export async function sha256(input: string): Promise { const data = new TextEncoder().encode(input) const hash = await window.crypto.subtle.digest("SHA-256", data) return new Uint8Array(hash).toHex() }