rust-otp:用于执行基于HMAC的一次性密码(HOTP)和基于时间的一次性密码(TOTP)算法的Rust库

时间:2021-05-15 23:37:19
【文件属性】:
文件名称:rust-otp:用于执行基于HMAC的一次性密码(HOTP)和基于时间的一次性密码(TOTP)算法的Rust库
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-15 23:37:19
Rust 锈-otp rust-otp是一个Rust库,用于执行和根据。 这些也是许多基于移动设备的2FA应用程序(例如和 )用于生成2FA代码的算法。 安装 通过将以下部分添加到Cargo.toml文件中,只需将库添加为依赖项Cargo.toml 。 [ dependencies . otp ] git = " https://github.com/TimDumol/rust-otp " 用法 // first argument is the secret, second argument is the counter println! ( "HOTP: {:?}" , otp :: make_hotp ( "base32secret3232" . to_ascii_uppercase (). as_str (), 0 ). unwrap ()); assert_eq!
【文件预览】:
rust-otp-master
----.travis.yml(89B)
----src()
--------lib.rs(3KB)
----Cargo.toml(524B)
----LICENSE.md(1KB)
----.gitignore(20B)
----README.md(2KB)

网友评论