2个不稳定版本
0.2.0 | 2023年3月8日 |
---|---|
0.1.0 | 2023年3月7日 |
在身份验证中排名第962
36KB
726 行
google_authenticator_converter
- 从Google Authenticator迁移QR码中提取名称、密钥和发行者
示例
use google_authenticator_converter::{extract_data_from_uri, process_data, Account};
let qr_code = "otpauth-migration://offline?data=CjMKCkhlbGxvId6tvu8SGFRlc3QxOnRlc3QxQGV4YW1wbGUxLmNvbRoFVGVzdDEgASgBMAIKMwoKSGVsbG8h3q2%2B8BIYVGVzdDI6dGVzdDJAZXhhbXBsZTIuY29tGgVUZXN0MiABKAEwAgozCgpIZWxsbyHerb7xEhhUZXN0Mzp0ZXN0M0BleGFtcGxlMy5jb20aBVRlc3QzIAEoATACEAEYASAAKI3orYEE";
let accounts = process_data(&qr_code);
for account in accounts.unwrap() {
println!("{0} {1} {2}", account.name, account.secret, account.issuer);
}
基于
lib.rs
:
Google Authenticator Converter
- 从Google Authenticator迁移QR码中提取名称、密钥和发行者
示例
use google_authenticator_converter::{extract_data_from_uri, process_data, Account};
let qr_code = "otpauth-migration://offline?data=CjMKCkhlbGxvId6tvu8SGFRlc3QxOnRlc3QxQGV4YW1wbGUxLmNvbRoFVGVzdDEgASgBMAIKMwoKSGVsbG8h3q2%2B8BIYVGVzdDI6dGVzdDJAZXhhbXBsZTIuY29tGgVUZXN0MiABKAEwAgozCgpIZWxsbyHerb7xEhhUZXN0Mzp0ZXN0M0BleGFtcGxlMy5jb20aBVRlc3QzIAEoATACEAEYASAAKI3orYEE";
let accounts = process_data(&qr_code);
for account in accounts.unwrap() {
println!("{0} {1} {2}", account.name, account.secret, account.issuer);
}
依赖项
~2.2–3MB
~65K SLoC