Rust implementation for HTOP, TOTP and steam guard tow-factor-authentication.
Use ring
0.16.20
,
may be incompatible with other version of ring
.
```rust use libr2fa::HOTPKey; use libr2fa::HMACType; use libr2fa::Key;
let mut hotpkey = HOTPKey { name: "".tostring(), key: "MFSWS5LGNBUXKZLBO5TGQ33JO5SWC2DGNF2WCZLIMZUXKZLXMFUGM2LVNFQWK53IMZUXK2A=".tostring(), digits: 6, counter: 0, recoverycodes: Vec::default(), hmac_type: HMACType::SHA1, };
let code = hotpkey.getcode().unwrap(); ```