feat: udpates

This commit is contained in:
2023-09-07 23:13:28 +08:00
parent 3d40730cb5
commit 17fed2d195
3 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ use rust_util::{opt_result, simple_error, XResult};
use crate::spec::TinyEncryptMeta;
pub fn write_tiny_encrypt_meta<W: Write>(w: &mut W, meta: &TinyEncryptMeta) -> XResult<usize> {
pub fn _write_tiny_encrypt_meta<W: Write>(w: &mut W, meta: &TinyEncryptMeta) -> XResult<usize> {
let meta_json = opt_result!( serde_json::to_string(meta), "Meta to JSON failed: {}");
let meta_json_bytes = meta_json.as_bytes();
let meta_json_bytes_len = meta_json_bytes.len();

View File

@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
pub const TINY_ENCRYPT_VERSION: &'static str = "1.0";
// pub const TINY_ENCRYPT_VERSION: &'static str = "1.0";
// pub const ENVELOP_TYPE_KMS: &'static str = "kms";
// pub const ENVELOP_TYPE_PGP: &'static str = "pgp";

View File

@@ -46,7 +46,7 @@ pub fn read_number(hint: &str, from: usize, to: usize) -> usize {
}
}
pub fn get_user_agent() -> String {
pub fn _get_user_agent() -> String {
format!("TinyEncrypt-rs v{}@{}", env!("CARGO_PKG_VERSION"),
if cfg!(target_os = "macos") {
"MacOS"