Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CCrypter Class Reference

Encryption/decryption context with key information. More...

#include <crypter.h>

Public Member Functions

bool SetKeyFromPassphrase (const SecureString &strKeyData, const std::vector< unsigned char > &chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)
 
bool Encrypt (const CKeyingMaterial &vchPlaintext, std::vector< unsigned char > &vchCiphertext) const
 
bool Decrypt (const std::vector< unsigned char > &vchCiphertext, CKeyingMaterial &vchPlaintext) const
 
bool SetKey (const CKeyingMaterial &chNewKey, const std::vector< unsigned char > &chNewIV)
 
void CleanKey ()
 
 CCrypter ()
 
 ~CCrypter ()
 

Private Member Functions

int BytesToKeySHA512AES (const std::vector< unsigned char > &chSalt, const SecureString &strKeyData, int count, unsigned char *key, unsigned char *iv) const
 

Private Attributes

std::vector< unsigned char, secure_allocator< unsigned char > > vchKey
 
std::vector< unsigned char, secure_allocator< unsigned char > > vchIV
 
bool fKeySet
 

Friends

class wallet_crypto::TestCrypter
 

Detailed Description

Encryption/decryption context with key information.

Definition at line 74 of file crypter.h.

Constructor & Destructor Documentation

CCrypter::CCrypter ( )
inline

Definition at line 97 of file crypter.h.

CCrypter::~CCrypter ( )
inline

Definition at line 104 of file crypter.h.

Member Function Documentation

int CCrypter::BytesToKeySHA512AES ( const std::vector< unsigned char > &  chSalt,
const SecureString strKeyData,
int  count,
unsigned char *  key,
unsigned char *  iv 
) const
private

Definition at line 16 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CCrypter::CleanKey ( )
inline

Definition at line 90 of file crypter.h.

Here is the call graph for this function:

bool CCrypter::Decrypt ( const std::vector< unsigned char > &  vchCiphertext,
CKeyingMaterial vchPlaintext 
) const

Definition at line 93 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCrypter::Encrypt ( const CKeyingMaterial vchPlaintext,
std::vector< unsigned char > &  vchCiphertext 
) const

Definition at line 75 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCrypter::SetKey ( const CKeyingMaterial chNewKey,
const std::vector< unsigned char > &  chNewIV 
)

Definition at line 63 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCrypter::SetKeyFromPassphrase ( const SecureString strKeyData,
const std::vector< unsigned char > &  chSalt,
const unsigned int  nRounds,
const unsigned int  nDerivationMethod 
)

Definition at line 43 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class wallet_crypto::TestCrypter
friend

Definition at line 76 of file crypter.h.

Member Data Documentation

bool CCrypter::fKeySet
private

Definition at line 80 of file crypter.h.

std::vector<unsigned char, secure_allocator<unsigned char> > CCrypter::vchIV
private

Definition at line 79 of file crypter.h.

std::vector<unsigned char, secure_allocator<unsigned char> > CCrypter::vchKey
private

Definition at line 78 of file crypter.h.


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