Skip to content

Commit

Permalink
Added doc for michael_block_function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostie314159 committed Aug 31, 2024
1 parent 3a67fff commit c1cf64d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/michael.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fn xswap(l: u32) -> u32 {
((l & 0xff00ff00) >> 8) | ((l & 0x00ff00ff) << 8)
}
/// Compute the michael block function.
pub fn michael_block_function(l: u32, r: u32) -> (u32, u32) {
let mut r = r ^ l.rotate_left(17);
let mut l = l.wrapping_add(r);
Expand Down

0 comments on commit c1cf64d

Please sign in to comment.