use thiserror::Error; pub mod v1; pub mod v2_map; pub mod v2_rc4; #[derive(Error, Debug)] pub enum QmcCryptoError { #[error("QMC V2/Map Cipher: Key is empty")] QMCV2MapKeyEmpty, } #[cfg(test)] mod test { pub fn generate_key(len: usize) -> Vec { (1..=len).map(|i| i as u8).collect() } #[cfg(test)] pub fn generate_key_128() -> [u8; 128] { generate_key(128) .try_into() .expect("failed to make test key") } }