You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let encrypted_content = cryptograpy::encrypt_string(&mut unencrypted_content,&cryptograpy::prompt_for_passwords("Insert password for database encryption: "));
let json_string:&str = &serde_json::to_string(&elements).unwrap();
173
-
let encrypted = cryptograpy::encrypt_string(&mut json_string.to_string(),&cryptograpy::prompt_for_passwords("Insert password for database encryption: "));
173
+
overwrite_database_json(json_string);
174
+
}
175
+
176
+
pubfnoverwrite_database_json(json:&str){
177
+
let encrypted = cryptograpy::encrypt_string(&mut json.to_string(),&cryptograpy::prompt_for_passwords("Insert password for database encryption: "));
174
178
utils::write_to_file(&encrypted,&mutFile::create(utils::get_db_path()).expect("Failed to open file"));
0 commit comments