Skip to content

Commit

Permalink
refactor: improve variable naming for clarity in encryption process
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Jan 7, 2025
1 parent eca84f9 commit 5959f19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/encrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![];
Expand All @@ -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<Vec<u8>> {
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());
Expand Down

0 comments on commit 5959f19

Please sign in to comment.