feat: v0.1.0, encrypt works

This commit is contained in:
2023-09-30 19:43:29 +08:00
parent c317a80119
commit 712e50319a
11 changed files with 143 additions and 35 deletions

View File

@@ -46,7 +46,7 @@ pub struct TinyEncryptEnvelop {
}
/// NOTICE: Kms and Age is not being supported in the future
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, PartialOrd)]
pub enum TinyEncryptEnvelopType {
#[serde(rename = "pgp")]
Pgp,
@@ -96,7 +96,7 @@ impl TinyEncryptMeta {
ecdh_point: None,
envelop: None,
envelops: Some(envelops),
encryption_algorithm: None,
encryption_algorithm: None, // use none default
nonce: encode_base64(nonce),
file_length: metadata.len(),
file_last_modified: match metadata.modified() {