easy_totp
TOTP in Rust, but with just a few simple functions to call.
BEWARE: handle secrets with caution
Creating a QR code for TOTP setup
use EasyTotp;
let raw_secret = String from;
let issuer = Some;
let account_name = String from;
let my_qr_code = create_qr_png;
Saving that QR code to a file
use EasyTotp;
use fs;
use Write;
let raw_secret = String from;
let issuer = Some;
let account_name = String from;
let filename = "./test_images/qr_code.png";
let my_qr_code = create_qr_png;
match my_qr_code
Generating TOTP codes for authentication
use EasyTotp;
let raw_secret = String from;
let issuer = Some;
let account_name = String from;
let token = generate_token.unwrap;