Cryptographic Hash

Hex
Base64
MD5 is intentionally NOT included — Web Crypto does not support it. Use a dedicated MD5 library for legacy compat ONLY (forensic file matching, etc.); never for security.

HMAC (Keyed Hash)

Hex
Base64
HMAC is the right primitive for: API request signing (AWS SigV4 derivative), webhook authenticity (Stripe, GitHub), session-cookie integrity. Use HMAC-SHA-256 by default.

AES-GCM Encryption (Authenticated)

Hex
Base64
AES-GCM provides confidentiality AND integrity. Never reuse an (key, IV) pair. The 16-byte authentication tag is appended to the ciphertext by Web Crypto.

RSA-OAEP Key Generation + Encryption

Generate an RSA key pair, then encrypt small payloads with the public key (max ~190 bytes for 2048-bit OAEP-SHA-256). For large payloads, hybrid encryption (AES key wrapped with RSA) is the standard pattern.

RSA-OAEP is for small payloads (key wrapping, short messages). For data, use hybrid: generate AES key → encrypt data with AES → wrap AES key with RSA. The Web Crypto API does not expose hybrid encryption directly; use the AES tab + RSA tab in sequence.

Encoding / Decoding

Cryptographically Secure Random

Uses crypto.getRandomValues() backed by the OS CSPRNG. Suitable for keys, IVs, salts, tokens, session IDs.

Common preset sizes