Skip to main content

decode_signing_key

Function decode_signing_key 

Source
pub(crate) fn decode_signing_key(
    input: &SecretString,
) -> Result<SecretSlice<u8>, AuthenticationError>
Expand description

Decodes boundary key material and enforces the RFC 7518 HS256 minimum.

Returns AuthenticationError::InvalidBase64Encoding for malformed input or AuthenticationError::KeyTooShort below HS256_MIN_KEY_BYTES.