OptionalencodingEncoding format for the random portion of the key body. Does NOT affect the hash stored in the database (always hex).
OptionalentropyNumber of cryptographically secure random bytes used for key entropy. The resulting encoded string length depends on the encoding:
OptionalhashHash algorithm used for key storage and comparison.
Must be a valid Node.js crypto.createHash() algorithm name
(e.g., 'sha256', 'sha512', 'sha384').
The hash is always output as a hex string regardless of the key encoding.
OptionalprefixPrefix prepended to generated API keys (e.g., 'mj_sk_', 'skip-').
Used for key format detection and identification.
Configuration for API key generation parameters.
WARNING: Changing these values after API keys have been created will invalidate all existing keys. They will fail format validation and/or hash comparison. Only change these before issuing any keys, or be prepared to rotate all keys.
All properties are optional — omitted values use the defaults shown below.