chore: improve qmc v1 impl
This commit is contained in:
parent
4cb2532c25
commit
aa4c650ff0
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user