mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
test: add more qmc_v1 test
This commit is contained in:
@@ -9,3 +9,17 @@ pub enum QmcCryptoError {
|
||||
#[error("QMC V2/Map Cipher: Key is empty")]
|
||||
QMCV2MapKeyEmpty,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
pub fn generate_key(len: usize) -> Vec<u8> {
|
||||
(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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user