CLI: Fix typo in option name
This commit is contained in:
parent
f0456193a9
commit
4561620eac
@ -1,7 +1,7 @@
|
|||||||
#ifndef GCRYPTCLI_VERSION_H
|
#ifndef GCRYPTCLI_VERSION_H
|
||||||
#define GCRYPTCLI_VERSION_H
|
#define GCRYPTCLI_VERSION_H
|
||||||
|
|
||||||
#define GCRYPTCLI_VERSION 0.12511
|
#define GCRYPTCLI_VERSION 0.12512
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ THIS IS EXPERIMENTAL SOFTWARE AND MUST BE CONSIDERED INSECURE. DO NOT USE THIS T
|
|||||||
|
|
||||||
--progress-interval INT default=['1000'] Print digestion progress reports every these many data blocks.
|
--progress-interval INT default=['1000'] Print digestion progress reports every these many data blocks.
|
||||||
|
|
||||||
--puffer-input VOID Will read the entire input before beginning any digestion.
|
--buffer-input VOID Will read the entire input before beginning any digestion.
|
||||||
|
|
||||||
--progress -p VOID Print digestion progress to stderr. May be advisable for large files, as the cipher is rather slow.
|
--progress -p VOID Print digestion progress to stderr. May be advisable for large files, as the cipher is rather slow.
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ THIS IS EXPERIMENTAL SOFTWARE AND MUST BE CONSIDERED INSECURE. DO NOT USE THIS T
|
|||||||
|
|
||||||
--iobase-10 VOID incompatibilities=[--iobase-bytes, --iobase-2, --iobase-8, --iobase-16, --iobase-64, --iobase-uwu, --iobase-ugh] Interpret and format ciphertexts in base10
|
--iobase-10 VOID incompatibilities=[--iobase-bytes, --iobase-2, --iobase-8, --iobase-16, --iobase-64, --iobase-uwu, --iobase-ugh] Interpret and format ciphertexts in base10
|
||||||
|
|
||||||
--puffer-output VOID Will digest the entire data before initiating any output.
|
--buffer-output VOID Will digest the entire data before initiating any output.
|
||||||
|
|
||||||
--lib-version VOID Will supply the version of GCryptLib used.
|
--lib-version VOID Will supply the version of GCryptLib used.
|
||||||
|
|
||||||
@ -154,10 +154,10 @@ File `decrypted_cat.jpg` will be created. You can now open it again. Its content
|
|||||||
|
|
||||||
#### Encrypting large files takes time. How's the progress?
|
#### Encrypting large files takes time. How's the progress?
|
||||||
```sh
|
```sh
|
||||||
$ gcrypt -e --keyask --infile "cat.jpg" --puffer-input --progress
|
$ gcrypt -e --keyask --infile "cat.jpg" --buffer-input --progress
|
||||||
```
|
```
|
||||||
Something along the lines of `Encrypting... (Block 200 / 1148 - 17.4216%)` will be regularly, but not too often, printed to stderr.
|
Something along the lines of `Encrypting... (Block 200 / 1148 - 17.4216%)` will be regularly, but not too often, printed to stderr.
|
||||||
Obviously, to print progress, we have to know the size of the input. Hence, it has to be puffered.
|
Obviously, to print progress, we have to know the size of the input. Hence, it has to be buffered.
|
||||||
|
|
||||||
#### Any cipher can also compute hashsums
|
#### Any cipher can also compute hashsums
|
||||||
```sh
|
```sh
|
||||||
@ -186,8 +186,8 @@ $ gcrypt -d --key "123" --infile "music.mp3.crypt" | mpv -
|
|||||||
By default, gcrypt will read a block, digest it, and output the result immediately.
|
By default, gcrypt will read a block, digest it, and output the result immediately.
|
||||||
Sometimes you don't want that. Use these flags, respectively:
|
Sometimes you don't want that. Use these flags, respectively:
|
||||||
```
|
```
|
||||||
--puffer-input # Reads all input to memory before beginning to digest it
|
--buffer-input # Reads all input to memory before beginning to digest it
|
||||||
--puffer-output # Digests all input before beginning to write any
|
--buffer-output # Digests all input before beginning to write any
|
||||||
```
|
```
|
||||||
|
|
||||||
## Esoteric data formats
|
## Esoteric data formats
|
||||||
|
@ -102,11 +102,11 @@ void CommandlineInterface::Init(int argc, const char* const* argv) {
|
|||||||
nupp.RegisterConstraint("--cli-version", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
nupp.RegisterConstraint("--cli-version", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
||||||
nupp.RegisterAbbreviation("-v", "--cli-version");
|
nupp.RegisterAbbreviation("-v", "--cli-version");
|
||||||
|
|
||||||
nupp.RegisterDescription("--puffer-input", "Will read the entire input before beginning any digestion.");
|
nupp.RegisterDescription("--buffer-input", "Will read the entire input before beginning any digestion.");
|
||||||
nupp.RegisterConstraint("--puffer-input", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
nupp.RegisterConstraint("--buffer-input", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
||||||
|
|
||||||
nupp.RegisterDescription("--puffer-output", "Will digest the entire data before initiating any output.");
|
nupp.RegisterDescription("--buffer-output", "Will digest the entire data before initiating any output.");
|
||||||
nupp.RegisterConstraint("--puffer-output", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
nupp.RegisterConstraint("--buffer-output", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
||||||
|
|
||||||
nupp.RegisterDescription("--no-newline", "Don't postfix stdout output with a newline");
|
nupp.RegisterDescription("--no-newline", "Don't postfix stdout output with a newline");
|
||||||
nupp.RegisterConstraint("--no-newline", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
nupp.RegisterConstraint("--no-newline", ParamConstraint(true, DATA_TYPE::VOID, {}, false, {}));
|
||||||
@ -173,10 +173,10 @@ void CommandlineInterface::SpecialCompatibilityChecking() {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(nupp.HasParam("--progress")) &&
|
(nupp.HasParam("--progress")) &&
|
||||||
(!nupp.HasParam("--puffer-input"))
|
(!nupp.HasParam("--buffer-input"))
|
||||||
|
|
||||||
) {
|
) {
|
||||||
CrashWithMsg("--progress requires --puffer-input to work!");
|
CrashWithMsg("--progress requires --buffer-input to work!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -323,16 +323,16 @@ bool DataIngestionLayer::ReachedEOF() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool DataIngestionLayer::IsBlockReady() {
|
bool DataIngestionLayer::IsBlockReady() {
|
||||||
// We're not ready, if we haven't reached EOF, if we should puffer
|
// We're not ready, if we haven't reached EOF, if we should buffer
|
||||||
// the input.
|
// the input.
|
||||||
if (
|
if (
|
||||||
(CommandlineInterface::Get().HasParam("--puffer-input")) &&
|
(CommandlineInterface::Get().HasParam("--buffer-input")) &&
|
||||||
(!reachedEof)
|
(!reachedEof)
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're not puffering, just return whether or not
|
// If we're not buffering, just return whether or not
|
||||||
// we have any blocks...
|
// we have any blocks...
|
||||||
return blocks.size() > 0;
|
return blocks.size() > 0;
|
||||||
}
|
}
|
||||||
|
@ -65,13 +65,13 @@ void DataOutputLayer::WriteBlock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if we have any block to write
|
// Check if we have any block to write
|
||||||
// and if we should (output-puffering)
|
// and if we should (output-buffering)
|
||||||
// Basically: only output if we have anything to output, and
|
// Basically: only output if we have anything to output, and
|
||||||
// if --puffer-output is given, only output once we have reachedEof.
|
// if --buffer-output is given, only output once we have reachedEof.
|
||||||
if (
|
if (
|
||||||
(blocks.size() > 0) &&
|
(blocks.size() > 0) &&
|
||||||
(
|
(
|
||||||
(!CommandlineInterface::Get().HasParam("--puffer-output")) ||
|
(!CommandlineInterface::Get().HasParam("--buffer-output")) ||
|
||||||
(reachedEof)
|
(reachedEof)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user