| LicenseSpring C++ SDK 7.27.0 Easily add Software Licensing to your application

Public Types | Public Member Functions | Protected Attributes | List of all members
LicenseSpring::CryptoProvider Class Referenceabstract

CryptoProvider interface. More...

`#include <LicenseSpring/CryptoProvider.h>`

Inheritance diagram for LicenseSpring::CryptoProvider:

## Public Types
using | ptr_t = std::shared_ptr< CryptoProvider >

## Public Member Functions
virtual | ~CryptoProvider ()
| Destructor for CryptoProvider object. More...
virtual std::string | encrypt (const std::string &inputString)=0
| Encrypt given string. More...
virtual std::string | decrypt (const std::string &inputString)=0
| Decrypt given string. More...
virtual void | setSalt (const std::string &salt)
| Set cryptographic salt. More...
virtual void | setKey (const std::string &key)
| Set key. More...
bool | isKeySet () const
| Checker for whether key is set. More...

## Protected Attributes
std::string | m_salt
std::string | m_key

## Detailed Description

CryptoProvider interface.

You can implement this interface to provide your custom approach for local license encryption. Before implementing your CryptoProvider class consider just changing Salt or Key of default provided.

Definition at line 19 of file CryptoProvider.h.

## Member Typedef Documentation

## ◆ ptr_t

using LicenseSpring::CryptoProvider::ptr_t = std::shared_ptr<CryptoProvider>

Definition at line 22 of file CryptoProvider.h.

## Constructor & Destructor Documentation

## ◆ ~CryptoProvider()

virtual LicenseSpring::CryptoProvider::~CryptoProvider | ( |  | ) |
| virtual

Destructor for CryptoProvider object.

## Member Function Documentation

## ◆ encrypt()

virtual std::string LicenseSpring::CryptoProvider::encrypt | ( | const std::string & | inputString | ) |
| pure virtual

Encrypt given string.

Parameters

  inputString | String to encrypt

Returns
  Encrypted string.

Implemented in LicenseSpring::DefaultCryptoProvider.

## ◆ decrypt()

virtual std::string LicenseSpring::CryptoProvider::decrypt | ( | const std::string & | inputString | ) |
| pure virtual

Decrypt given string.

Parameters

  inputString | String to decrypt

Returns
  Decrypted string.

Implemented in LicenseSpring::DefaultCryptoProvider.

## ◆ setSalt()

virtual void LicenseSpring::CryptoProvider::setSalt | ( | const std::string & | salt | ) |
| virtual

Set cryptographic salt.

Parameters

  salt | New value to set salt to equal

## ◆ setKey()

virtual void LicenseSpring::CryptoProvider::setKey | ( | const std::string & | key | ) |
| virtual

Set key.

Parameters

  key | New value to set key to equal

## ◆ isKeySet()

bool LicenseSpring::CryptoProvider::isKeySet | ( |  | ) | const

Checker for whether key is set.

Returns
  True if the key is set (not empty), false if not set (empty).

## Member Data Documentation

## ◆ m_salt

std::string LicenseSpring::CryptoProvider::m_salt
| protected

Definition at line 50 of file CryptoProvider.h.

## ◆ m_key

std::string LicenseSpring::CryptoProvider::m_key
| protected

Definition at line 51 of file CryptoProvider.h.

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

- LicenseSpring/CryptoProvider.h