#totp #password #rfc #algorithm #time #rfc-6238 #otp

rustotp

基于RFC 6238中规定的基于时间的单次密码(TOTP)算法的简单、纯Rust实现

1个不稳定版本

使用旧的Rust 2015

0.1.0 2017年4月23日

#931认证


rustotp_cli 中使用

MIT 许可证

4KB

RusTOTP

RusTOTP是RFC 6238中规定的基于时间的单次密码(TOTP)算法和基于HMAC的单次密码算法的简单Rust实现,分别对应RFC 4226。

用法

从rustotp_cli crate构建命令行客户端

$ cd rustotp_cli
$ cargo build

从密钥生成单个OTP

$ ./target/debug/rustotp_cli 42
663792

或者,启动一个交互式会话,每个时间步长生成一个新的OTP,并显示一个可视化进度条

$ ./target/debug/rustotp_cli 42 --timestep=5 --interactive
495515
#####
#####
783920
#####
#####
484936
#####
####

依赖关系

~37KB