onetime_cli/lib.rs
1//! # Onetime-cli
2//!
3//!Encrypt / decrypt files using the one-time pad.
4//!
5//! ## Usage
6//!
7//! The simplest way to encrypt a file called `secret.txt` is:
8//!
9//! ```bash
10//! onetime-cli encrypt secret.txt
11//! ```
12//!
13//! which will generate two new files `secret.txt.otp.0` and `secret.txt.otp.1`. You can then delete `secret.txt`.
14//!
15//!
16//!
17//! To decrypt `secret.txt`, run:
18//!
19//! ```bash
20//! onetime-cli decrypt secret.txt
21//! ```
22//!
23//! which will use the two `secret.txt.otp.*` files to decrypt `secret.txt`. You can then delete these two files.
24//!
25//!
26//!
27//! To see more possible cli arguments, run:
28//!
29//! ```bash
30//! onetime-cli --help
31//! ```
32
33#![warn(missing_docs)]
34
35mod config;
36mod error;
37mod fs;
38mod otp;
39
40pub use config::Config;
41pub use error::{Error, IoError};
42pub use otp::{decrypt, decrypt_file, encrypt, encrypt_file};