(env_value: string | undefined): Keyring | null Create a keyring from environment variable.
Keys are separated by __ for rotation support. First key is used
for signing, all keys are tried for verification.
CryptoKeys are cached on first use for performance.
Security: key rotation is an operational concern. Old keys remain valid
for verification indefinitely — a leaked old key can forge session cookies
until it is removed from SECRET_COOKIE_KEYS. After rotating to a new
signing key, remove the old key within a grace period (e.g. 24–48 hours,
long enough for active sessions to re-sign with the new key via cookie
refresh). Treat SECRET_COOKIE_KEYS changes as security-critical deploys.
env_value
the SECRET_COOKIE_KEYS environment variable
string | undefinedreturns
Keyring | null keyring or null if no keys configured