Web Crypto API
Hashing, random values and encryption in the browser and Node.js with `crypto.subtle` and `crypto.getRandomValues()`.
Content tagged web-crypto
Snippet:Bytes to Hex and Back with
Uint8Array.fromHex()andtoHex()Convert bytes to hex and back without padStart loops.Encode bytes as hex with ES2026's Uint8Array toHex(), decode with fromHex() and setFromHex(), with SHA-256 digests, colours, error cases and a padStart fallback.