MCPcopy Create free account
hub / github.com/tailscale/tailcat / hex

Function hex

web/app.js:58–60  ·  view source on GitHub ↗
(digest)

Source from the content-addressed store, hash-verified

56const setStatus = (msg) => { $("status").textContent = msg; };
57
58async function hex(digest) {
59 return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("");
60}
61
62async function sha256Hex(bytes) {
63 return hex(await crypto.subtle.digest("SHA-256", bytes));

Callers 1

sha256HexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected