Update Rust crate base32 to 0.5.0 #24
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -52,9 +52,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base32"
|
name = "base32"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
|
checksum = "d1ce0365f4d5fb6646220bb52fe547afd51796d90f914d4063cb0b032ebee088"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
|
@ -7,5 +7,5 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
totp_rfc6238 = "0.5.3"
|
totp_rfc6238 = "0.5.3"
|
||||||
base32 = "0.4.0"
|
base32 = "0.5.0"
|
||||||
clap = { version = "4.5.4", features = ["derive"] }
|
clap = { version = "4.5.4", features = ["derive"] }
|
||||||
|
@ -77,7 +77,7 @@ fn main() {
|
|||||||
.set_hash_algorithm(HashAlgorithm::SHA1)
|
.set_hash_algorithm(HashAlgorithm::SHA1)
|
||||||
.build();
|
.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 code = totp_generator.get_code(&key);
|
||||||
let next_update = totp_generator.get_next_update_time().unwrap();
|
let next_update = totp_generator.get_next_update_time().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user