工具 · 现代密码学

高熵加密密钥与 UUID 生成器

通过 Web Crypto API 生成密码学安全的随机值。无种子偏差,高熵高保密,浏览器端本地运算。

Type:
UUID v4 (Random Cryptographic) 128 bits entropy
Batch Output (5 items)
01 / DATABASE SCALE

Prefer UUIDv7 Over UUIDv4 for B-Trees

Standard UUIDv4 is fully random, causing massive page splits and cache eviction in PostgreSQL / MySQL primary keys. UUIDv7 embeds a millisecond Unix timestamp in the high bits, retaining locality while preserving uniqueness.

02 / CRYPTO SEEDING

Never Use Math.random() for Secrets

Standard pseudo-random number generators in programming languages are deterministic PRNGs vulnerable to state recovery. Always invoke crypto.getRandomValues() for session tokens, password salts, and API keys.

03 / STORAGE

Hash API Keys Before Storing

Treat API keys with the same hygiene as passwords. Store only their SHA-256 hash in your database, displaying the raw secret only once at generation time to eliminate leak exposure on database dumps.