Fix build and clippy warnings (#433)

This commit is contained in:
Tony Arcieri (iqlusion)
2022-11-12 14:15:42 -07:00
committed by GitHub
parent 87ed7b2338
commit 4310cc0f9a
8 changed files with 19 additions and 21 deletions
+1 -1
View File
@@ -404,7 +404,7 @@ fn is_weak_key(key: &[u8; DES_LEN_3DES]) -> bool {
c = (c & 0x0F) + ((c >> 4) & 0x0F);
// if count is even, set low key bit to 1, otherwise 0
tmp[i] = (key[i] & 0xFE) | (if c & 0x01 == 0x01 { 0x00 } else { 0x01 });
tmp[i] = (key[i] & 0xFE) | u8::from(c & 0x01 != 0x01);
}
// check odd parity key against table by DES key block