Skip to main content

load_key

Function load_key 

Source
pub fn load_key(base64_str: &str) -> Result<EncryptionKey, EncryptionError>
Expand description

Load a 32-byte key from a base64-encoded string (e.g. {PREFIX}_OAUTH_ENCRYPTION_KEY).

Returns an error (not a panic) so callers can surface a clear operator message at startup and refuse to proceed rather than silently using a bad key.