Skip to content

Commit

Permalink
format the state matrix better in reference_impl.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
oconnor663 committed Mar 20, 2024
1 parent d99ad87 commit 4ec3be8
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions reference_impl/reference_impl.rs
Expand Up @@ -78,23 +78,14 @@ fn compress(
block_len: u32,
flags: u32,
) -> [u32; 16] {
let counter_low = counter as u32;
let counter_high = (counter >> 32) as u32;
#[rustfmt::skip]
let mut state = [
chaining_value[0],
chaining_value[1],
chaining_value[2],
chaining_value[3],
chaining_value[4],
chaining_value[5],
chaining_value[6],
chaining_value[7],
IV[0],
IV[1],
IV[2],
IV[3],
counter as u32,
(counter >> 32) as u32,
block_len,
flags,
chaining_value[0], chaining_value[1], chaining_value[2], chaining_value[3],
chaining_value[4], chaining_value[5], chaining_value[6], chaining_value[7],
IV[0], IV[1], IV[2], IV[3],
counter_low, counter_high, block_len, flags,
];
let mut block = *block_words;

Expand Down

0 comments on commit 4ec3be8

Please sign in to comment.