Satisfy clippy in the SHA-1 helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -383,10 +383,10 @@ pub fn sha1(data: &[u8]) -> [u8; 20] {
|
||||
msg.push(0);
|
||||
}
|
||||
msg.extend((data.len() as u64 * 8).to_be_bytes());
|
||||
for block in msg.chunks_exact(64) {
|
||||
for block in msg.as_chunks::<64>().0 {
|
||||
let mut w = [0u32; 80];
|
||||
for (i, word) in block.chunks_exact(4).enumerate() {
|
||||
w[i] = u32::from_be_bytes(word.try_into().unwrap());
|
||||
for (i, word) in block.as_chunks::<4>().0.iter().enumerate() {
|
||||
w[i] = u32::from_be_bytes(*word);
|
||||
}
|
||||
for i in 16..80 {
|
||||
w[i] = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]).rotate_left(1);
|
||||
|
||||
Reference in New Issue
Block a user