Skip to content

Commit 7d94b15

Browse files
Add description to README.md and lib.rs
1 parent 975294c commit 7d94b15

File tree

2 files changed

+69
-2
lines changed

2 files changed

+69
-2
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
# onetime-cli
2-
Encrypt / decrypt file using the one-time-pad
1+
# Onetime-cli
2+
3+
Encrypt / decrypt files using the one-time-pad.
4+
5+
## Install
6+
7+
If you have cargo installed, run:
8+
```bash
9+
cargo install onetime-cli
10+
```
11+
12+
Otherwise you can download an executable from the [Release section](https://github.com/einfachIrgendwer0815/onetime-cli/releases).
13+
14+
15+
16+
## Usage
17+
18+
The simplest way to encrypt a file called `secret.txt` is:
19+
```bash
20+
onetime-cli encrypt secret.txt
21+
```
22+
which will generate two new files `secret.txt.otp.0` and `secret.txt.otp.1`. You can then delete `secret.txt`.
23+
24+
25+
26+
To decrypt `secret.txt`, run:
27+
```bash
28+
onetime-cli decrypt secret.txt
29+
```
30+
which will use the two `secret.txt.otp.*` files to decrypt `secret.txt`. You can then delete these two files.
31+
32+
33+
34+
To see more possible cli arguments, run:
35+
```bash
36+
onetime-cli --help
37+
```

src/lib.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
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+
133
pub mod args;
234

335
mod otp;

0 commit comments

Comments
 (0)