ootp

Crates.ioootp
lib.rsootp
version0.1.1
sourcesrc
created_at2021-07-16 06:14:59.596175
updated_at2021-09-07 19:31:59.490072
descriptionOOTP (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!
homepagehttps://github.com/odroe/ootp
repositoryhttps://github.com/odroe/ootp
max_upload_size
id423365
size25,113
Leonardo Razovic (lrazovic)

documentation

https://docs.rs/ootp

README

OOTP

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!

Rust crates.io version

Introduction

The OOTP for Rust library is a Rust implementation of the OOTP library.

Features

  • Generate one-time passwords for multiple languages
  • 100% Open source
  • HOTP
  • TOTP
  • RFC 4226
  • RFC 6238

Installation

Add the following line to your Cargo.toml file:

[dependencies]
ootp = "0.0.6"

Get started

use ootp::*;

fn main() {
   let secret = "Base32 decoded secret";
   let totp = Totp::secret(
       secret,
       CreateOption::Default
   );
   let otp = totp.make(); // Generate a one-time password
   println!("{}", otp); // Print the one-time password
}

Examples

Documentation

License

The OOTP for Rust library is licensed under the MIT license.

Commit count: 424

cargo fmt