From 6435006bae7160716bdaf01436cea66347752caa Mon Sep 17 00:00:00 2001 From: Asger Hautop Drewsen Date: Thu, 15 Oct 2020 14:45:27 +0200 Subject: Zero-pad auth code --- src/bin/rbw/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index b2f64a3..bd1b1c2 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -1435,7 +1435,7 @@ fn remove_db() -> anyhow::Result<()> { fn generate_totp(secret: &str) -> anyhow::Result { Ok(format!( - "{}", + "{:06}", oath::totp_raw_now( &base32::decode( base32::Alphabet::RFC4648 { padding: false }, -- cgit v1.2.3-54-g00ecf