Skip to content
// EFFECT DAYS 2026

BrowserCrypto unstable

Browser layers for the effect/crypto modules.

Every layer here runs the core WebCrypto layer of its family, so that browser programs take every crypto layer from BrowserCrypto. They use the WebCrypto reference, which defaults to the browser's globalThis.crypto. 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.

10 exports Since v4.0.0 Source

Layers

layer

unstable
Since v4.0.0

Layer that provides every effect/crypto service on the WebCrypto reference.

Details

This merges the family layers of this module, so it requires nothing.

Signature

declare const layer: Layer.Layer<SecureRandom.SecureRandom | Digest.Digest | Mac.Mac | Kdf.Kdf | Aead.Aead | Cipher.Cipher | Signature.Signature | KeyAgreement.KeyAgreement | KeyWrap.KeyWrap>

layerAead

unstable
Since v4.0.0

Layer that provides Aead on the WebCrypto reference.

Details

This is Aead.layerWebCrypto with layerSecureRandom.

Signature

declare const layerAead: Layer.Layer<Aead.Aead>

layerCipher

unstable
Since v4.0.0

Layer that provides Cipher on the WebCrypto reference.

Details

This is Cipher.layerWebCrypto with layerSecureRandom.

Signature

declare const layerCipher: Layer.Layer<Cipher.Cipher>

layerDigest

unstable
Since v4.0.0

Layer that provides Digest on the WebCrypto reference.

Details

This is Digest.layerWebCrypto, re-exported for browser programs.

Signature

declare const layerDigest: Layer.Layer<Digest.Digest>

layerKdf

unstable
Since v4.0.0

Layer that provides Kdf on the WebCrypto reference.

Details

This is Kdf.layerWebCrypto, re-exported for browser programs.

Signature

declare const layerKdf: Layer.Layer<Kdf.Kdf>
Since v4.0.0

Layer that provides KeyAgreement on the WebCrypto reference.

Details

This is KeyAgreement.layerWebCrypto with layerSecureRandom.

Signature

declare const layerKeyAgreement: Layer.Layer<KeyAgreement.KeyAgreement>
Since v4.0.0

Layer that provides KeyWrap on the WebCrypto reference.

Details

This is KeyWrap.layerWebCrypto with layerSecureRandom.

Signature

declare const layerKeyWrap: Layer.Layer<KeyWrap.KeyWrap>

layerMac

unstable
Since v4.0.0

Layer that provides Mac on the WebCrypto reference.

Details

This is Mac.layerWebCrypto with layerSecureRandom.

Signature

declare const layerMac: Layer.Layer<Mac.Mac>
Since v4.0.0

Layer that provides SecureRandom on the WebCrypto reference.

Details

This is SecureRandom.layerWebCrypto, re-exported for browser programs.

Signature

declare const layerSecureRandom: Layer.Layer<SecureRandom.SecureRandom>
Since v4.0.0

Layer that provides Signature on the WebCrypto reference.

Details

This is Signature.layerWebCrypto with layerSecureRandom.

Signature

declare const layerSignature: Layer.Layer<Signature.Signature>