R2FA

Build Status R2FA on crates.io

Rust Two-Factor Authentication (R2FA) is a collection of tools for two-factor authentication.

Features

Installation

You can find R2FA on crates.io and include it in your Cargo.toml:

toml r2fa = "^0.1.0"

Quick example

More examples are available in the documentation.

```rust extern crate r2fa; use r2fa::otp::TOTPBuilder;

let key = "GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ".tostring(); let code = TOTPBuilder::new() .base32key(&key) .finalize() .unwrap() .generate(); assert_eq!(code.len(), 6); ```