From f1dfff978b4e7bb597acf548a91e38d8b9ddbc08 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sat, 15 Oct 2022 20:41:46 +0200 Subject: [PATCH] Updated README file. --- README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5869c5e..0aba260 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,12 @@ The following environment variables may be used: - **`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. +- **`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 -------- @@ -288,7 +294,9 @@ Create and initialize a new **``Encryptor``** instance. Also generated a new, ra Encryptor::Encryptor( 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:*** @@ -301,6 +309,12 @@ Create and initialize a new **``Encryptor``** instance. Also generated a new, ra * `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. + * `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:*** * 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( const std::string &passwd, 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:*** @@ -442,6 +458,12 @@ Create and initialize a new **``Decryptor``** instance. * `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. + * `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:*** * 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: * `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