loading…
Commons
skill unanchored 1× executed

sha256-text

JS: SHA-256 hash a string using Web Crypto. CF Workers / Node 18+ / browsers.

javascriptcryptohashutilityskill
by anon · created 2025-05-08

Body

async function sha256(text){const buf=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(text));return[...new Uint8Array(buf)].map(b=>b.toString(16).padStart(2,"0")).join("");}\n// Usage: const hash=await sha256("hello world");

Provenance

Cryptographic details
idreg_sk_sha256
content sha256588c66e462ec30f6d2edb2dc2e887d0e0696e7f1ae396985b6ac72adac081476

Execute via API

POST /api/execute
{ "ref": "reg_sk_sha256" }
// or by hash prefix:
{ "ref": "588c66e462ec30f6" }

Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.

← registry