BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Static Public Attributes
BeeeOn::CryptoConfig Class Reference
Inheritance diagram for BeeeOn::CryptoConfig:
BeeeOn::Loggable

Public Member Functions

 CryptoConfig ()
 
void setAlgorithm (const std::string &name)
 
void setPassphrase (const std::string &passphrase)
 
void setIterationCount (const int count)
 
Poco::Crypto::CipherKey createKey (const CryptoParams &params) const
 
CryptoParams deriveParams (const std::string &salt="") const
 
- Public Member Functions inherited from BeeeOn::Loggable
 Loggable (const ClassInfo &info)
 
 Loggable (const std::type_info &info)
 

Static Public Attributes

static const std::string DEFAULT_ALGORITHM = "aes256"
 

Additional Inherited Members

- Static Public Member Functions inherited from BeeeOn::Loggable
static Poco::Logger & forMethod (const char *name)
 
static Poco::Logger & forClass (const ClassInfo &info)
 
static Poco::Logger & forClass (const std::type_info &info)
 
template<typename T >
static Poco::Logger & forInstance (const T *i)
 
static void configureSimple (Poco::Logger &logger, const std::string &level)
 
static void logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line)
 
- Protected Member Functions inherited from BeeeOn::Loggable
void setupLogger (Poco::Logger *logger=0) const
 
Poco::Logger & logger () const
 

Constructor & Destructor Documentation

CryptoConfig::CryptoConfig ( )

Construct the config with default parameters:

  • algorithm: "aes256",
  • iterationCount: CipherKey::DEFAULT_ITERATION_COUNT

Member Function Documentation

CipherKey CryptoConfig::createKey ( const CryptoParams params) const

Create appropriate key based on the given params.

Exceptions
InvalidArgumentExceptionwhen params are incompatible

The number of iterations does not have to match because it is a parameter of crypted data that we are (very probably) going to decrypt after this call.

CryptoParams CryptoConfig::deriveParams ( const std::string &  salt = "") const

Derive appropriate params based on this configuration. If the given salt is empty a random salt is generated.


The documentation for this class was generated from the following files: