Updated README file.
This commit is contained in:
parent
73b7131b87
commit
f1dfff978b
30
README.md
30
README.md
@ -132,6 +132,12 @@ The following environment variables may be used:
|
|||||||
- **`SLUNK_THREADS`**:
|
- **`SLUNK_THREADS`**:
|
||||||
Specifies the number of worker threads to use. By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
Specifies the number of worker threads to use. By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
||||||
|
|
||||||
|
- **`SLUNK_LEGACY_COMPAT`**:
|
||||||
|
If set to a *non-zero* value, enables "legacy" compatibility-mode, required to decrypt files encrypted with SlunkCrypt version 1.2.x or older.
|
||||||
|
|
||||||
|
- **`SLUNK_DEBUG_LOGGING`**:
|
||||||
|
If set to a *non-zero* value, enables additional logging output to the syslog (Unix-like) or to the debugger (Windows). This is intended for debugging purposes only!
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@ -288,7 +294,9 @@ Create and initialize a new **``Encryptor``** instance. Also generated a new, ra
|
|||||||
|
|
||||||
Encryptor::Encryptor(
|
Encryptor::Encryptor(
|
||||||
const std::string &passwd,
|
const std::string &passwd,
|
||||||
const size_t thread_count = 0U
|
const size_t thread_count = 0U,
|
||||||
|
const bool legacy_compat = false,
|
||||||
|
const bool debug_logging = false
|
||||||
);
|
);
|
||||||
|
|
||||||
***Parameters:***
|
***Parameters:***
|
||||||
@ -301,6 +309,12 @@ Create and initialize a new **``Encryptor``** instance. Also generated a new, ra
|
|||||||
* `thread_count`
|
* `thread_count`
|
||||||
Specifies the number of worker threads to use (optional). By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
Specifies the number of worker threads to use (optional). By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
||||||
|
|
||||||
|
* `legacy_compat`
|
||||||
|
Enables "legacy" compatibility-mode; required to encrypt messages in a way that allows decryption with SlunkCrypt version 1.2.x or earlier. Option is disabled by default.
|
||||||
|
|
||||||
|
* `debug_logging`
|
||||||
|
Enables additional debug logging. Messages are written to the syslog (Unix-like) or to the debugger (Windows). Option is disabled by default.
|
||||||
|
|
||||||
***Exceptions:***
|
***Exceptions:***
|
||||||
|
|
||||||
* Throws `std::runtime_error`, if the nonce could not be generated, or if the SlunkCrypt context could not be allocated.
|
* Throws `std::runtime_error`, if the nonce could not be generated, or if the SlunkCrypt context could not be allocated.
|
||||||
@ -424,7 +438,9 @@ Create and initialize a new **``Decryptor``** instance.
|
|||||||
Decryptor::Decryptor(
|
Decryptor::Decryptor(
|
||||||
const std::string &passwd,
|
const std::string &passwd,
|
||||||
const uint64_t nonce,
|
const uint64_t nonce,
|
||||||
const size_t thread_count = 0U
|
const size_t thread_count = 0U,
|
||||||
|
const bool legacy_compat = false,
|
||||||
|
const bool debug_logging = false
|
||||||
);
|
);
|
||||||
|
|
||||||
***Parameters:***
|
***Parameters:***
|
||||||
@ -442,6 +458,12 @@ Create and initialize a new **``Decryptor``** instance.
|
|||||||
* `thread_count`
|
* `thread_count`
|
||||||
Specifies the number of worker threads to use (optional). By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
Specifies the number of worker threads to use (optional). By default, SlunkCrypt detects the number of available processors and creates one thread for each processor.
|
||||||
|
|
||||||
|
* `legacy_compat`
|
||||||
|
Enables "legacy" compatibility-mode; required to decrypt messages that were encrypted with SlunkCrypt version 1.2.x or earlier. Option is disabled by default.
|
||||||
|
|
||||||
|
* `debug_logging`
|
||||||
|
Enables additional debug logging. Messages are written to the syslog (Unix-like) or to the debugger (Windows). Option is disabled by default.
|
||||||
|
|
||||||
***Exceptions:***
|
***Exceptions:***
|
||||||
|
|
||||||
* Throws `std::runtime_error`, if the SlunkCrypt context could not be allocated.
|
* Throws `std::runtime_error`, if the SlunkCrypt context could not be allocated.
|
||||||
@ -801,7 +823,9 @@ Erase the contents of a byte array, by overwriting it with *zero* bytes. Compile
|
|||||||
The `slunkparam_t` struct is used to pass additional parameters that will be used for initializing the SlunkCrypt context. It contains the following fields:
|
The `slunkparam_t` struct is used to pass additional parameters that will be used for initializing the SlunkCrypt context. It contains the following fields:
|
||||||
|
|
||||||
* `version` – The version of the parameter struct; **must** be set to *`SLUNKCRYPT_PARAM_VERSION`*.
|
* `version` – The version of the parameter struct; **must** be set to *`SLUNKCRYPT_PARAM_VERSION`*.
|
||||||
* `thread_count` – The number of worker threads to use. If this parameter is set to **0**, which is the *default* value, then SlunkCrypt automatically detects the number of available (logical) processors and creates one thread for each processor. Also, the number of threads is capped to a maximum of `MAX_THREADS` (currently defined as **16**).
|
* `thread_count` – The number of worker threads to use. If this parameter is set to **0**, which is the *default* value, then SlunkCrypt automatically detects the number of available (logical) processors and creates one thread for each processor. Also, the number of threads is capped to a maximum of `MAX_THREADS` (currently defined as **32**).
|
||||||
|
* `legacy_compat` – If set to *`SLUNKCRYPT_TRUE`*, enables "legacy" compatibility-mode; required to decrypt messages that were encrypted with SlunkCrypt version 1.2.x or earlier.
|
||||||
|
* `debug_logging` – If set to *`SLUNKCRYPT_TRUE`*, enables additional debug logging; messages are written to the syslog (Unix-like) or to the debugger (Windows).
|
||||||
|
|
||||||
### Global variables
|
### Global variables
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user