Expand description
§Web Cryptography module
Installs globalThis.crypto (Crypto) together with the
SubtleCrypto and CryptoKey interfaces, following the
Web Cryptography API and the
globalThis.crypto semantics shared by browsers, Deno and workerd.
§Implemented
crypto.getRandomValues(typedArray)andcrypto.randomUUID()crypto.subtle.digest- SHA-1, SHA-256, SHA-384, SHA-512crypto.subtle.importKey/exportKey-rawandjwk(kty: "oct")crypto.subtle.generateKey- HMAC, AES-GCM, AES-CBCcrypto.subtle.sign/verify- HMAC with any of the four hashescrypto.subtle.encrypt/decrypt- AES-GCM (96-bit IV, 128-bit tag) and AES-CBC (PKCS#7)crypto.subtle.deriveBits/deriveKey- PBKDF2 and HKDF
§Not implemented
Asymmetric algorithms (RSASSA-PKCS1-v1_5, RSA-PSS, RSA-OAEP, ECDSA, ECDH,
Ed25519, X25519) and AES-CTR/AES-KW are recognized by name and rejected
with a NotSupportedError that names the algorithm. Key wrapping
(wrapKey/unwrapKey) is likewise absent.
Structs§
- Crypto
- The Web Cryptography
Cryptointerface. - Crypto
Key - The Web Cryptography
CryptoKeyinterface. - Subtle
Crypto - The Web Cryptography
SubtleCryptointerface.
Functions§
- init
- Register
Crypto,SubtleCryptoandCryptoKey, then install theglobalThis.cryptoinstance with itssubtlemember.