feature/v32-tokens
Edward Shen 2021-06-24 10:41:42 -04:00
parent 98ab7ab9e8
commit fe967a2272
Signed by: edward
GPG Key ID: 19182661E818369F
1 changed files with 2 additions and 2 deletions

View File

@ -197,8 +197,8 @@ fn validate_token(
let (nonce, encrypted) = data.split_at(NONCEBYTES);
let nonce = Nonce::from_slice(&nonce).ok_or(TokenValidationError::InvalidNonce)?;
let decrypted = open_precomputed(&encrypted, &nonce, precomputed_key)
let nonce = Nonce::from_slice(nonce).ok_or(TokenValidationError::InvalidNonce)?;
let decrypted = open_precomputed(encrypted, &nonce, precomputed_key)
.map_err(|_| TokenValidationError::DecryptionFailure)?;
let parsed_token: Token =