CryptoSys¶
#include<Zostera/crypto_sys.h>
CryptoSys is the Class that manages now your keyrings that you can chain varius Encryption metodes to increase complexity.
-
class
CCryptoSys
¶ Public Functions
-
~CCryptoSys
()¶ Constructor.
- Parameters
auto_create
: If the Keyrings should be initialized
-
void
putEncryptionKeyring
(Zostera::CKeyRing *kr)¶ Adding the keyring for Encryption purposes.
- Parameters
kr
: the keyring
-
void
putDecryptionKeyring
(Zostera::CKeyRing *kr)¶ Adding the keyring for Decryption purposes.
- Parameters
kr
: the keyring
-
std::string
encrypt
(std::string &message)¶ Encrypts the string with the given encryption keyring.
- Parameters
message
: your plain text
-
std::string
decrypt
(std::string &message)¶ Decrypts the string with the given decryption keyring.
- Parameters
message
: your cipher text
-
std::tuple<char *, size_t>
encrypt
(std::tuple<char *, size_t> input)¶ Encryption method for bytes.
- Parameters
input
: Tuple of a char pointer and the corresponding length
-
std::tuple<char *, size_t>
decrypt
(std::tuple<char *, size_t> input)¶ Decryption method for bytes.
- Parameters
input
: Tuple of a char pointer and the corresponding length
-
int
autoBuild
(std::string &path)¶ Builds the cryptosys with a given directory. It generates the Keyrings and all Keys.
- Parameters
path
: Directory
-
int
autoSave
(std::string &path)¶ Saves the entire cryptosys into a given directory.
- Parameters
path
: Directory
-