工具 · 现代密码学
高熵加密密钥与 UUID 生成器
通过 Web Crypto API 生成密码学安全的随机值。无种子偏差,高熵高保密,浏览器端本地运算。
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.
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.
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.