diff --git a/um_crypto/kuwo/src/kwm_v1.rs b/um_crypto/kuwo/src/kwm_v1.rs index cd51313..b530122 100644 --- a/um_crypto/kuwo/src/kwm_v1.rs +++ b/um_crypto/kuwo/src/kwm_v1.rs @@ -11,7 +11,10 @@ const KEY: [u8; 0x20] = [ impl CipherV1 { pub fn new(resource_id: u32) -> Self { let mut key = KEY; - for (k, r) in key.iter_mut().zip(resource_id.to_string().as_bytes()) { + for (k, r) in key + .iter_mut() + .zip(resource_id.to_string().as_bytes().iter().cycle()) + { *k ^= r; }