mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-07 20:19:51 +00:00
chore: improve qmc v1 impl
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user