MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1import { createHash } from "node:crypto";
2
3console.log("createHash:", typeof createHash);
4
5const hash = createHash("sha256");
6
7console.log("hash:", typeof hash);
8console.log("hash.update:", typeof (hash && hash.update));
9console.log("hash.digest:", typeof (hash && hash.digest));
10
11const out = hash.update("ant").digest("hex");
12console.log("digest:", out);