Skip to content

Commit

Permalink
fix: remove unsafe println (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesposito authored Nov 29, 2023
1 parent ed847bc commit 747da6b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@ fn main() {
}

fn encrypt_file(password: &String, filename: &String) {
println!("Encrypting file: {}", filename);
let encryption_key = EncryptionKey::new(password.as_bytes(), 900_000);
println!("encryption_key: {:?}", encryption_key.pubk);
let enclave = Enclave::from_plain_bytes(
encryption_key.salt,
&encryption_key.pubk,
get_file_as_byte_vec(filename),
)
.unwrap();
let encrypted_bytes: Vec<u8> = enclave.into();
println!("encrypted_bytes: {:?}", encrypted_bytes);

File::create(format!("{}.secured", filename))
.expect("Unable to create file")
Expand Down

0 comments on commit 747da6b

Please sign in to comment.