aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-10-15 20:59:26 -0400
committerGitHub <noreply@github.com>2020-10-15 20:59:26 -0400
commitbefd4c74e9078bcfd130845d2c6e615a472695cb (patch)
treeb76f2dcb9b4c93136a52ff4e77d69e3d56cbe36c
parent921dd17da84d4ae85d142f8b13e8098869883775 (diff)
parent6435006bae7160716bdaf01436cea66347752caa (diff)
downloadrbw-befd4c74e9078bcfd130845d2c6e615a472695cb.tar.gz
rbw-befd4c74e9078bcfd130845d2c6e615a472695cb.zip
Merge pull request #25 from Tyilo/zero_pad
Zero-pad auth code
-rw-r--r--src/bin/rbw/commands.rs2
1 files changed, 1 insertions, 1 deletions
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<String> {
Ok(format!(
- "{}",
+ "{:06}",
oath::totp_raw_now(
&base32::decode(
base32::Alphabet::RFC4648 { padding: false },