Skip to content

Commit

Permalink
Remove useless as_bytes() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
brycx committed Jan 15, 2025
1 parent 8601520 commit 5a7e337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/version4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ impl LocalToken {
/// Domain separator for key-splitting the authentication key (24 in length as bytes).
const DOMAIN_SEPARATOR_AUTH: &'static str = "paseto-auth-key-for-aead";

const M1_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_ENC.as_bytes().len();
const M2_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_AUTH.as_bytes().len();
const M1_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_ENC.len();
const M2_LEN: usize = V4::LOCAL_NONCE + Self::DOMAIN_SEPARATOR_AUTH.len();

/// Split the user-provided secret key into keys used for encryption and authentication.
fn key_split(sk: &[u8], n: &[u8]) -> Result<(EncKey, EncNonce, AuthKey), Error> {
Expand Down

0 comments on commit 5a7e337

Please sign in to comment.