Crates.io | simple-steam-totp |
lib.rs | simple-steam-totp |
version | 0.1.0 |
source | src |
created_at | 2022-01-15 18:52:27.573277 |
updated_at | 2022-01-15 18:52:27.573277 |
description | Generate Steam TOTP auth codes from Rust |
homepage | |
repository | |
max_upload_size | |
id | 514489 |
size | 4,897 |
Generate Steam TOTP auth codes from Rust.
Your Steam TOTP shared secret is required to generate codes, here's how you can get it.
Add simple-steam-totp = "0.1.0"
under your [dependencies]
in Cargo.toml
use simple_steam_totp::{generate};
fn main() {
// ↓↓↓ Shared secret, must be a valid base64 encoded string
match generate("V59i4SUqNiuYDrssYyMz62RSI9k=") {
Ok(code) => println!("Code: {}", code),
Err(e) => println!("Error: {}", e),
}
}
Licensed under MIT.