Skip to main content

token_open

Function token_open 

Source
pub fn token_open(
    key: &TokenKey<'_>,
    token: &[u8],
    out: &mut [u8],
) -> Result<usize, TokenOpenError>
Expand description

Verifies the MAC (constant time) before decrypting. out must hold the whole ciphertext (token.len() - TOKEN_OVERHEAD); padding is only stripped after the in-place decrypt.