From 5959f19068cc1004e0f199068b9b03164bb621f4 Mon Sep 17 00:00:00 2001 From: Kremilly Date: Tue, 7 Jan 2025 07:47:04 -0300 Subject: [PATCH] refactor: improve variable naming for clarity in encryption process --- src/core/encrypt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/encrypt.rs b/src/core/encrypt.rs index 60d93cd..24f8727 100644 --- a/src/core/encrypt.rs +++ b/src/core/encrypt.rs @@ -86,7 +86,6 @@ impl<'a> Encrypt<'a> { .expect("Encryption error"); let encrypted_file_path = format!("{}.aes", &self.file_path); - FileUtils::create_path(&encrypted_file_path); let mut output = vec![]; @@ -96,11 +95,12 @@ impl<'a> Encrypt<'a> { remove_file(&self.file_path)?; SuccessAlerts::dump(&encrypted_file_path); + Ok(()) } pub fn decrypt_and_read(&self) -> Result> { - let user_key = prompt_password("Enter the key (password): ") + let user_key = prompt_password("Enter the password: ") .expect("Error reading the password"); let key_hash = Sha256::digest(user_key.as_bytes());