Registry / auth / totp-rs

totp-rs

JSON →
library5.7.1rscratesunverified

RFC-compliant TOTP implementation with ease of use and additional quality-of-life features.

# Cargo.toml [dependencies] totp-rs = "5.7.1"
INSTALL
IMPORT
SIG · TOTP-RS
T
totp-rs
authrustv5.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TOTP
use totp_rs::TOTP;

Generates a TOTP token from a base32-encoded secret.

use totp_rs::{TOTP, Secret, Algorithm}; fn main() { let secret = Secret::Encoded("JBSWY3DPEHPK3PXP".to_string()); let totp = TOTP::new(Algorithm::SHA1, 6, 1, 30, secret).unwrap(); let token = totp.generate_current().unwrap(); println!("TOTP: {}", token); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
5.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
38
Resources
totp-rs — cargo add totp-rs · libregistry