diff --git a/um_crypto/qmc/src/v1/cipher.rs b/um_crypto/qmc/src/v1/cipher.rs index 363142f..7d35e2f 100644 --- a/um_crypto/qmc/src/v1/cipher.rs +++ b/um_crypto/qmc/src/v1/cipher.rs @@ -5,8 +5,7 @@ pub const V1_KEY_SIZE: usize = 128; #[inline] pub fn qmc1_transform(key: &[u8; V1_KEY_SIZE], value: u8, offset: usize) -> u8 { let offset = match offset { - 0..V1_OFFSET_BOUNDARY => offset, - V1_OFFSET_BOUNDARY => V1_OFFSET_BOUNDARY, + 0..=V1_OFFSET_BOUNDARY => offset, offset => offset % V1_OFFSET_BOUNDARY, };