From 11780c3dd1b3449a21fa2256b5379b9c7ee325dc Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Fri, 17 May 2024 00:26:21 +0000 Subject: [PATCH 1/2] Update Rust crate base32 to 0.5.0 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a120900..95b8e53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,9 +52,9 @@ dependencies = [ [[package]] name = "base32" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" +checksum = "d1ce0365f4d5fb6646220bb52fe547afd51796d90f914d4063cb0b032ebee088" [[package]] name = "cc" diff --git a/Cargo.toml b/Cargo.toml index 1d4e6fe..3e0afcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,5 +7,5 @@ edition = "2018" [dependencies] totp_rfc6238 = "0.5.3" -base32 = "0.4.0" +base32 = "0.5.0" clap = { version = "4.5.4", features = ["derive"] } -- 2.45.2 From bcfd55eb5caec39d4a0f22c3796b44b002dbc4a2 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 23 May 2024 09:27:58 +0000 Subject: [PATCH 2/2] Update src/main.rs --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 67231c0..f2949a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -77,7 +77,7 @@ fn main() { .set_hash_algorithm(HashAlgorithm::SHA1) .build(); - let key = base32::decode(Alphabet::RFC4648 { padding: true }, &secret).unwrap(); + let key = base32::decode(Alphabet::Rfc4648 { padding: true }, &secret).unwrap(); let code = totp_generator.get_code(&key); let next_update = totp_generator.get_next_update_time().unwrap(); -- 2.45.2