- What prefix conventions does it support?
- Common ones: `sk_` (Stripe-style secret), `pk_` (public), `whsec_` (webhook signing), `tok_`, plus a custom prefix field. Prefixes help you identify the key type in logs.
- Base62 or hex output?
- Both. Base62 is shorter and URL-safe; hex is more readable. Base58 (Bitcoin-style) is available if you want to avoid visually ambiguous chars (0/O, 1/l).
- Is the randomness crypto-secure?
- Yes — uses the browser's `crypto.getRandomValues`. Safe for real API keys, session tokens, and secrets.
- How long should an API key be?
- 32 characters of base62 gives ~190 bits of entropy — plenty for any practical threat. Shorter keys need prefixes + secret rotation.