Updates of all packages

This commit is contained in:
QuantumEntangledAndy committed 2023-04-15 08:05:58 +07:00
1 parent a424fa55c0
commit 78375b220d
26 files changed
+848 -881

No files matched your search

+8 -4
View File
@@ -6,15 +6,19 @@ use hex_string::HexString;
use requestty::Question;
use std::convert::TryInto;
use aes::Aes128;
use cfb_mode::cipher::{NewStreamCipher, StreamCipher};
use cfb_mode::Cfb;
use aes::{
cipher::{AsyncStreamCipher, KeyIvInit},
Aes128,
};
use cfb_mode::Decryptor;
type Aes128CfbDec = Decryptor<Aes128>;
const IV: &[u8] = b"0123456789abcdef";
fn decrypt(buf: &[u8], aeskey: &[u8; 16]) -> Vec<u8> {
let mut decrypted = buf.to_vec();
Cfb::<Aes128>::new(aeskey.into(), IV.into()).decrypt(&mut decrypted);
Aes128CfbDec::new(aeskey.into(), IV.into()).decrypt(&mut decrypted);
decrypted
}