OOTP (Open One-time Password) is a supports multiple programming languages. The generated one-time passwords are fully compliant with HOTP (HMAC-based One-time Password) and TOTP (Time-based One-time Password). 🚀It's easy to use!
The OOTP for Rust library is a Rust implementation of the OOTP library.
Add the following line to your Cargo.toml file:
toml
[dependencies]
ootp = "0.2"
or use the following command:
bash
$ cargo install ootp
```rust use ootp::*;
fn main() { let secret = String::from("Base32 decoded secret"); let totp = Totp::secret( secret, TotpWithSecretCreateOption::Default );
let otp = totp.make(); // Generate a one-time password
println!("{}", otp); // Print the one-time password
} ```
The OOTP for Rust library is licensed under the MIT license.