NodeCrypto API Reference | Effect
Node.js layers for the effect/crypto modules, also used by Bun.
layerDigest runs MD5 and SHA on node:crypto, layerMac runs
HMAC on node:crypto, layerKdf adds Argon2id, layerAead
runs ChaCha20-Poly1305 on node:crypto, and layerSecureRandom,
layerCipher, layerSignature, layerKeyAgreement, and
layerKeyWrap run the core WebCrypto layers. Each Node.js layer
handles only the algorithms and keys it exists for and hands the rest to
the core WebCrypto implementation. Layers that need SecureRandom get it
from layerSecureRandom, so no layer here has requirements.
layer provides every family at once; provide a family’s own layer to
pick services selectively.
CryptoKey-backed keys go through Node.js’s crypto.subtle, because
KeyObject.from(cryptoKey) is deprecated (DEP0204). A CryptoKey must
come from the WebCrypto reference: Node.js rejects one from another
reference with a TypeError, which is a defect.
Read more here: Source link
