How to encrypt and decrypt file

fn main() {
  println!("Master password >>");

  let mut f = OpenOptions::new()
  .expect("Can't open the file");

  const account = "test";
  f.write(account.as_bytes()).expect("Can't write in the file");


What i want is to encrypt this account.txt file, and when user type the right password, decrypt account.txt file

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.