Skip to content

Commit

Permalink
fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
initsecret committed Sep 16, 2023
1 parent 0a4c0d3 commit 41bd413
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ocb3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,12 @@ fn nonce_dependent_variables<
let mut Nonce = u128::from_be_bytes(Nonce);
// Nonce = num2str(TAGLEN mod 128,7) || zeros(120-bitlen(N)) || 1 || N
Nonce |= 1 << 96;
if tag_len == 16 {
// do nothing because 128 mod 128 = 0
} else if tag_len < 16 {
Nonce |= (u128::from(tag_len) * 8) << (128 - 7);
} else {
unreachable!();
match tag_len {
16 => {}
x if x < 16 => {
Nonce |= (u128::from(tag_len) * 8) << (128 - 7);
}
_ => unreachable!(),
}

// Separate the last 6 bits into `bottom`, and the rest into `top`.
Expand Down

0 comments on commit 41bd413

Please sign in to comment.