OSDN Git Service

Some code clean-up.
[slunkcrypt/SlunkCrypt.git] / README.md
1 SlunkCrypt
2 ==========
3
4 An experimental cryptography library and command-line tool.
5
6
7 Legal Warning
8 -------------
9
10 Use of SlunkCrypt may be illegal in countries where encryption is outlawed. We believe it is legal to use SlunkCrypt in many countries all around the world, but we are not lawyers, and so if in doubt you should seek legal advice before downloading it. You may find useful information at [cryptolaw.org](http://www.cryptolaw.org/), which collects information on cryptography laws in many countries, but we can't vouch for its correctness.
11
12
13 Command-line Usage
14 ------------------
15
16 **Synopsis:**
17
18     slunkcrypt --encrypt [[@][:]<passphrase>] <input.txt> <output.enc>
19     slunkcrypt --decrypt [[@][:]<passphrase>] <input.enc> <output.txt>
20
21 **Commands:**
22
23 - **`--encrypt` (`-e`):**  
24   Encrypt the plaintext in the given input file. The ciphertext is written to the specified output file.
25 - **`--decrypt` (`-d`):**  
26   Decrypt the ciphertext in the given input file. The plaintext is written to the specified output file.
27 - **`--self-test` (`-t`):**  
28   Run self-test and exit application.
29
30 **Options:**
31 - If `<passphrase>` is prefixed with a **`@`** character, then it specifies the file to read the passphrase from.  
32   *Note:* Only the first non-empty line in the specified file is used!
33 - If `<passphrase>` is prefixed with a **`:`** character, then the leading character is ignored.
34 - If `<passphrase>` is omitted, then the passphrase is read from the `SLUNK_PASSPHRASE` environment variable.
35 - If `<passphrase>` is set to **`@-`**, then the passphrase is read from the standard input stream.
36
37
38 License
39 -------
40
41 This work has been released under the **CC0 1.0 Universal** license.
42
43 For details, please refer to:  
44 <https://creativecommons.org/publicdomain/zero/1.0/legalcode>