Crate google_authenticator_converter

Crate google_authenticator_converter 

Source
Expand description

§Google Authenticator Converter

  • Extract name, secret and issuer from a Google Authenticator migration QR code

§Example

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);
}

Structs§

Account

Functions§

extract_data_from_uri
process_data
Convert a Google Authenticator migration QR code string to a list of accounts