Every crypto family on the host's own libraries (Effect's
@effect/platform-node NodeCrypto)::
program.pipe(provide(native.layer))Digests and HMAC run on hashlib and hmac; Argon2id on
cryptography (on a worker thread); ChaCha20-Poly1305 on
cryptography; the rest on the WebCrypto reference, whose default
is the host's. Random bytes come from os.urandom.
Values#
| Attribute | Type | Description |
|---|---|---|
layer_secure_random | Layer[secure_random.SecureRandom] | Random bytes from the |
layer_digest | Layer[digest.Digest] | Digests on |
layer_mac | Layer[mac.Mac] | HMAC on |
layer_kdf | Layer[kdf.Kdf] | HKDF and PBKDF2 on the |
layer_aead | Layer[aead.Aead] | AES-GCM on the |
layer_cipher | Layer[cipher.Cipher] |
|
layer_signature | Layer[signature_module.Signature] |
|
layer_key_agreement | Layer[key_agreement.KeyAgreement] |
|
layer_key_wrap | Layer[key_wrap.KeyWrap] |
|
layer | Layer[Services] | Every crypto family. |
Types#
| Type | Definition | Description |
|---|---|---|
Services | type Services = secure_random.SecureRandom | digest.Digest | mac.Mac | kdf.Kdf | aead.Aead | cipher.Cipher | signature_module.Signature | key_agreement.KeyAgreement | key_wrap.KeyWrap |