aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-20 21:35:50 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-20 21:35:50 +0200
commit378cbd76d0ce97e24941a81ff57c210c0342bd01 (patch)
tree34e8307948d7ed45683220da8d0b306e4a6bda9d /src/main.rs
parent4a228a3ce7c843a8e6e7254f858201d0ba1c8b6f (diff)
downloadaerogramme-378cbd76d0ce97e24941a81ff57c210c0342bd01.tar.gz
aerogramme-378cbd76d0ce97e24941a81ff57c210c0342bd01.zip
Fix things
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index a2630d6..fe426b4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -158,7 +158,10 @@ async fn main() -> Result<()> {
let existing_password =
rpassword::prompt_password("Enter existing password to decrypt keys: ")?;
let new_password = if gen {
- let password = base64::encode(&u128::to_be_bytes(thread_rng().gen())[..10]);
+ let password = base64::encode_config(
+ &u128::to_be_bytes(thread_rng().gen())[..10],
+ base64::URL_SAFE_NO_PAD,
+ );
println!("Your new password: {}", password);
println!("Keep it safe!");
password