feat: set default encryption algorithm

This commit is contained in:
2023-09-30 22:55:03 +08:00
parent b656d49933
commit 015fa42ca7
3 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ use rust_util::util_time;
use rust_util::util_time::get_millis;
use serde::{Deserialize, Serialize};
use crate::util::{encode_base64, get_user_agent};
use crate::util::{encode_base64, get_user_agent, TINY_ENC_AES_GCM};
pub const TINY_ENCRYPT_VERSION_10: &'static str = "1.0";
pub const TINY_ENCRYPT_VERSION_11: &'static str = "1.1";
@@ -96,7 +96,7 @@ impl TinyEncryptMeta {
ecdh_point: None,
envelop: None,
envelops: Some(envelops),
encryption_algorithm: None, // use none default
encryption_algorithm: Some(TINY_ENC_AES_GCM.to_string()),
nonce: encode_base64(nonce),
file_length: metadata.len(),
file_last_modified: match metadata.modified() {