feat: v1.8.0, simple-encrypt and simple-decrypt

This commit is contained in:
2024-11-17 10:30:39 +08:00
parent 6a07360dc1
commit 8e6e708c73
7 changed files with 180 additions and 19 deletions

View File

@@ -295,7 +295,7 @@ pub(crate) fn encrypt_file(file_in: &mut impl Read, file_len: u64, file_out: &mu
Ok(total_len)
}
fn encrypt_envelops(cryptor: Cryptor, key: &[u8], envelops: &[&TinyEncryptConfigEnvelop]) -> XResult<Vec<TinyEncryptEnvelop>> {
pub fn encrypt_envelops(cryptor: Cryptor, key: &[u8], envelops: &[&TinyEncryptConfigEnvelop]) -> XResult<Vec<TinyEncryptEnvelop>> {
let mut encrypted_envelops = vec![];
for envelop in envelops {
match envelop.r#type {