Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fliegendewurst/andotp-import
andOTP backup reader (Rust crate)
https://github.com/fliegendewurst/andotp-import
andotp
Last synced: 3 days ago
JSON representation
andOTP backup reader (Rust crate)
- Host: GitHub
- URL: https://github.com/fliegendewurst/andotp-import
- Owner: FliegendeWurst
- License: mit
- Created: 2023-10-02T19:46:54.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-12T13:04:52.000Z (about 1 year ago)
- Last Synced: 2025-01-03T21:41:19.528Z (4 days ago)
- Topics: andotp
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# andotp-import
This is a simple crate to read encrypted backups created by the [andOTP](https://github.com/andOTP/andOTP/) Android app.
## Usage
Create an encrypted backup in the app and copy it to where you need it.
The code below will prompt for a password, open the backup file and print all current TOTP codes.```rust
fn main() {
let pw = rpassword::prompt_password("password: ").unwrap();
let accts = andotp_import::read_from_file("./otp_accounts_2023-10-02_18-58-25.json.aes", &pw).unwrap();for (acct, totp) in accts {
println!("{} {}", acct.label, totp.generate_current().unwrap());
}
}
```The full API documentation is available at [docs.rs](https://docs.rs/andotp-import/).
## License
MIT License, see [`LICENSE`](./LICENSE)