fix error messages

transfer
Avril 4 years ago
parent 3e93f71547
commit 675544c4b5
Signed by: flanchan
GPG Key ID: 284488987C31F630

2
Cargo.lock generated

@ -34,7 +34,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha20"
version = "1.0.1"
version = "1.0.2"
dependencies = [
"base64",
"getrandom",

@ -1,7 +1,7 @@
[package]
name = "chacha20"
description = "chacha20_poly1305 encryption tool"
version = "1.0.1"
version = "1.0.2"
authors = ["Avril <flanchan@cumallover.me>"]
edition = "2018"
license = "gpl-3.0-or-later"
@ -10,4 +10,4 @@ license = "gpl-3.0-or-later"
base64 = "0.13"
getrandom = "0.2"
openssl = "0.10"
smallvec = {version = "1.6", features=["write", "union"]}
smallvec = {version = "1.6", features=["union"]}

@ -92,8 +92,8 @@ fn main() {
output.flush().expect("Failed to flush stdout");
},
Mode::Decrypt => {
let mut output = stream::Sink::decrypt(stdout.lock(), key, iv).expect("Failed to create encrypter");
std::io::copy(&mut input.lock(), &mut output).expect("Failed to encrypt");
let mut output = stream::Sink::decrypt(stdout.lock(), key, iv).expect("Failed to create decrypter");
std::io::copy(&mut input.lock(), &mut output).expect("Failed to decrypt");
output.flush().expect("Failed to flush stdout");
},
Mode::Keygen => {

Loading…
Cancel
Save