#totp #hotp #rfc6238 #ootp #rust

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!

9 releases

0.1.1 Sep 7, 2021
0.1.0 Aug 21, 2021
0.0.7 Jul 24, 2021

#213 in Cryptography

Download history 20/week @ 2022-04-23 48/week @ 2022-04-30 57/week @ 2022-05-07 155/week @ 2022-05-14 30/week @ 2022-05-21 63/week @ 2022-05-28 55/week @ 2022-06-04 2/week @ 2022-06-18 9/week @ 2022-07-02 9/week @ 2022-07-09 18/week @ 2022-07-16 18/week @ 2022-07-23 20/week @ 2022-07-30

65 downloads per month

MIT license

23KB
420 lines

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.

Dependencies

~2MB
~23K SLoC