feat: v1.2.1, update versions

This commit is contained in:
2025-01-14 23:41:30 +08:00
parent 62eaab264f
commit 5a2c42544b
2 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ use std::{
fs::{ self, File }, fs::{ self, File },
}; };
use std::path::PathBuf; use std::path::PathBuf;
use rust_util::{XResult, util_time::*}; use rust_util::{XResult, util_time::*, util_msg::*};
use tiny_encrypt::CmdEncrypt; use tiny_encrypt::CmdEncrypt;
use oss_util::*; use oss_util::*;
use config_util::*; use config_util::*;

View File

@@ -12,7 +12,7 @@ use openpgp::{
types::KeyFlags, types::KeyFlags,
serialize::stream::{ serialize::stream::{
Message, Message,
Encryptor, Encryptor2,
LiteralWriter, LiteralWriter,
}, },
policy::StandardPolicy as P, policy::StandardPolicy as P,
@@ -65,7 +65,7 @@ impl OpenPGPTool {
} else { } else {
Message::new(bw) Message::new(bw)
}; };
let encryptor = Encryptor::for_recipients(message, recipients).build()?; let encryptor = Encryptor2::for_recipients(message, recipients).build()?;
let mut pgp_encrypt_writer = LiteralWriter::new(encryptor).build()?; let mut pgp_encrypt_writer = LiteralWriter::new(encryptor).build()?;
let mut from = File::open(from_file)?; let mut from = File::open(from_file)?;
encrypt_read_write(&mut from, &mut pgp_encrypt_writer)?; encrypt_read_write(&mut from, &mut pgp_encrypt_writer)?;
@@ -81,7 +81,7 @@ fn encrypt_read_write(file: &mut File, write: &mut dyn Write) -> XResult<()> {
let mut read = 0_u64; let mut read = 0_u64;
let pb = ProgressBar::new(file_len); let pb = ProgressBar::new(file_len);
pb.set_style(ProgressStyle::default_bar().template(PB_TEMPLATE).progress_chars(PB_PROGRESS)); pb.set_style(ProgressStyle::default_bar().template(PB_TEMPLATE)?.progress_chars(PB_PROGRESS));
loop { loop {
let len = match file.read(&mut buf) { let len = match file.read(&mut buf) {