Update main.rs

This commit is contained in:
2023-01-31 09:03:07 +05:30
committed by GitHub
parent 00b34bba2d
commit 7ee20dc4fb

View File

@@ -141,7 +141,7 @@ pub fn read_cipher(path: String) -> (Vec<u8>, Vec<u8>) {
pub fn decrypt(ciphertext: Vec<u8>, secret_key: orion::kdf::SecretKey) -> String { pub fn decrypt(ciphertext: Vec<u8>, secret_key: orion::kdf::SecretKey) -> String {
let plaintext = match aead::open(&secret_key, &ciphertext) { let plaintext = match aead::open(&secret_key, &ciphertext) {
Ok(temp) => { Ok(temp) => {
println!("{} Data was decrypted", "Success".bright_green()); println!("{} Data was decrypted", "Success:".bright_green());
temp temp
} }
Err(_) => { Err(_) => {