libr2fa 0.1.2

rust implementation for HTOP, TOTP and steam guard tow-factor-authentication
Documentation

r2fa

Rust implementation for HTOP, TOTP and steam guard tow-factor-authentication.

Use ring 0.16.20, may be incompatible with other version of ring.

Usage

use libr2fa::HOTPKey;
use libr2fa::HMACType;
use libr2fa::Key;

let mut hotp_key = HOTPKey {
    name: "".to_string(),
    key: "MFSWS5LGNBUXKZLBO5TGQ33JO5SWC2DGNF2WCZLIMZUXKZLXMFUGM2LVNFQWK53IMZUXK2A=".to_string(),
    digits: 6,
    counter: 0,
    recovery_codes: Vec::default(),
    hmac_type: HMACType::SHA1,
};

let code = hotp_key.get_code().unwrap();