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

+4 -4
View File
@@ -7,11 +7,11 @@ edition = "2018"
license = "AGPL-3.0-or-later"
[dependencies]
aes = "0.6"
aes = "0.8.2"
anyhow = "1.0.42"
cfb-mode = "0.6"
cfb-mode = "0.8.2"
env_logger = "*"
hex-string = "0.1.0"
md5 = "0.7"
md5 = "0.7.0"
requestty = "0.5.0"
log = { version = "0.4" }
log = "0.4.17"
+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
}