diff --git a/Cargo.lock b/Cargo.lock index 27526b7..8a44d78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,9 +287,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.24" +version = "4.5.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9560b07a799281c7e0958b9296854d6fafd4c5f31444a7e5bb1ad6dde5ccf1bd" +checksum = "b95dca1b68188a08ca6af9d96a6576150f598824bdb528c1190460c2940a0b48" dependencies = [ "clap_builder", "clap_derive", @@ -297,9 +297,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.24" +version = "4.5.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874e0dd3eb68bf99058751ac9712f622e61e6f393a94f7128fa26e3f02f5c7cd" +checksum = "9ab52925392148efd3f7562f2136a81ffb778076bcc85727c6e020d6dd57cf15" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index c180b9f..48d1310 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ rpassword = "7.3.1" data-encoding = "2.6.0" copypasta-ext = "0.4.4" zeroize = { version = "1.8.1", features = ["zeroize_derive"] } -clap = { version = "4.5.24", features = ["derive"] } +clap = { version = "4.5.25", features = ["derive"] } hmac = "0.12.1" sha1 = "0.10.6" sha2 = "0.10.8" diff --git a/src/otp/algorithms/yandex_otp_maker.rs b/src/otp/algorithms/yandex_otp_maker.rs index 2ac7a51..93fa78b 100644 --- a/src/otp/algorithms/yandex_otp_maker.rs +++ b/src/otp/algorithms/yandex_otp_maker.rs @@ -76,7 +76,7 @@ where let parsed_secret = &decoded_secret.as_slice()[0..SECRET_LENGHT]; - let mut pin_with_secret: Vec = Vec::with_capacity(pin.as_bytes().len() + SECRET_LENGHT); + let mut pin_with_secret: Vec = Vec::with_capacity(pin.len() + SECRET_LENGHT); pin_with_secret.append(&mut pin.as_bytes().to_vec()); pin_with_secret.append(&mut parsed_secret.to_vec());