Updated README file.

This commit is contained in:
LoRd_MuldeR 2020-10-20 15:33:03 +02:00
parent 20d7632fcb
commit 23df735ba2
Signed by: mulder
GPG Key ID: 2B5913365F57E03F
2 changed files with 30 additions and 11 deletions

View File

@ -1,13 +1,40 @@
SlunkCrypt SlunkCrypt
========== ==========
An experimental cryptography library An experimental cryptography library and command-line tool.
Legal Warning Legal Warning
------------- -------------
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. 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.
Command-line Usage
------------------
**Synopsis:**
slunkcrypt --encrypt [[@][:]<passphrase>] <input.txt> <output.enc>
slunkcrypt --decrypt [[@][:]<passphrase>] <input.enc> <output.txt>
**Commands:**
- **`--encrypt` (`-e`):**
Encrypt the plaintext in the given input file. The ciphertext is written to the specified output file.
- **`--decrypt` (`-d`):**
Decrypt the ciphertext in the given input file. The plaintext is written to the specified output file.
- **`--self-test` (`-t`):**
Run self-test and exit application.
**Options:**
- If `<passphrase>` is prefixed with a **`@`** character, then it specifies the file to read the passphrase from.
*Note:* Only the first non-empty line in the specified file is used!
- If `<passphrase>` is prefixed with a **`:`** character, then the leading character is ignored.
- If `<passphrase>` is omitted, then the passphrase is read from the `SLUNK_PASSPHRASE` environment variable.
- If `<passphrase>` is set to **`@-`**, then the passphrase is read from the standard input stream.
License License
------- -------

View File

@ -65,17 +65,9 @@ static void print_manpage(const CHR *const program)
FPUTS(T("This software has been released under the CC0 1.0 Universal license:\n"), stderr); FPUTS(T("This software has been released under the CC0 1.0 Universal license:\n"), stderr);
FPUTS(T("https://creativecommons.org/publicdomain/zero/1.0/legalcode\n"), stderr); FPUTS(T("https://creativecommons.org/publicdomain/zero/1.0/legalcode\n"), stderr);
FPUTS(T("====================================================================\n\n"), stderr); FPUTS(T("====================================================================\n\n"), stderr);
FPUTS(T("Synopsis:\n"), stderr); FPUTS(T("Usage:\n"), stderr);
FPRINTF(stderr, T(" %") T(PRISTR) T(" --encrypt [[@][:]<passphrase>] <input.txt> <output.enc>\n"), program); FPRINTF(stderr, T(" %") T(PRISTR) T(" --encrypt [[@][:]<passphrase>] <input.txt> <output.enc>\n"), program);
FPRINTF(stderr, T(" %") T(PRISTR) T(" --decrypt [[@][:]<passphrase>] <input.enc> <output.txt>\n\n"), program); FPRINTF(stderr, T(" %") T(PRISTR) T(" --decrypt [[@][:]<passphrase>] <input.enc> <output.txt>\n\n"), program);
FPUTS(T("Options:\n"), stderr);
FPUTS(T("- If <passphrase> is prefixed with a '@' character, then it specifies the file\n"), stderr);
FPUTS(T(" to read the passphrase from; only the first line in that file is used!\n"), stderr);
FPUTS(T("- If <passphrase> is prefixed with a ':' character, then the leading character\n"), stderr);
FPUTS(T(" is skipped and the remainder of the argument is used as passphrase.\n"), stderr);
FPUTS(T("- If argument <passphrase> is omitted, then the passphrase is read from the\n"), stderr);
FPRINTF(stderr, T(" environment variable \"%") T(PRISTR) T("\" instead.\n"), ENVV_PASSWD_NAME);
FPUTS(T("- Specify \"@-\" in order to read the passphrase from the standard input stream!\n\n"), stderr);
} }
static char* read_passphrase(const CHR* const file_name) static char* read_passphrase(const CHR* const file_name)