KeyRings

#include<Zostera/key_ring.h>

KeyRing manages all your encryption methodes. It has for Encryption an decryption (asyncron) method you need 2 keyrings one for encryption purporsed and one for decryption

class CKeyRing

Public Functions

void addKey(Zostera::CKeyWrapper *wrapper)

Adds the given Key to the keylist.

Parameters
  • wrapper: CKeyWrapper* instance of one of the classes that inherits from CKeyWrapper

void wipeKeys()

Deletes all keys that this keyring manages.

Zostera::CKeyWrapper *getKey(unsigned int)

Returns one of the key based on the given index. If the index is out of bound it will throw a Zostera Exception.

Parameters
  • index: unsigned int index

void load_and_append(const std::string &method, const std::string &encrypt, const std::string &mode, const std::string &file)

Function that is primary used internally.

Parameters
  • method: (M_AES; M_RSA)

  • encrypt: (“1”, “0”)

  • mode: std::string

  • file: std::string path to the given file.

void save(const std::string &path, const std::string &pur)

Saves all keys that this keyring is managing.

Parameters
  • pur: std::string tells if this keyring was used for encryption or decryption purposes.

  • path: std::string directory where all the files should be put.

unsigned int size()

Returns how many keys this keyring is managing.