Bitcoin ABC 0.30.5
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< uint8_t > &chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)
 
bool Encrypt (const CKeyingMaterial &vchPlaintext, std::vector< uint8_t > &vchCiphertext) const
 
bool Decrypt (const std::vector< uint8_t > &vchCiphertext, CKeyingMaterial &vchPlaintext) const
 
bool SetKey (const CKeyingMaterial &chNewKey, const std::vector< uint8_t > &chNewIV)
 
void CleanKey ()
 
 CCrypter ()
 
 ~CCrypter ()
 

Private Member Functions

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

Private Attributes

std::vector< uint8_t, secure_allocator< uint8_t > > vchKey
 
std::vector< uint8_t, secure_allocator< uint8_t > > vchIV
 
bool fKeySet
 

Friends

class wallet_crypto_tests::TestCrypter
 

Detailed Description

Encryption/decryption context with key information.

Definition at line 64 of file crypter.h.

Constructor & Destructor Documentation

◆ CCrypter()

CCrypter::CCrypter ( )
inline

Definition at line 95 of file crypter.h.

◆ ~CCrypter()

CCrypter::~CCrypter ( )
inline

Definition at line 101 of file crypter.h.

Here is the call graph for this function:

Member Function Documentation

◆ BytesToKeySHA512AES()

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

Definition at line 13 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CleanKey()

void CCrypter::CleanKey ( )
inline

Definition at line 89 of file crypter.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Decrypt()

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

Definition at line 100 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Encrypt()

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

Definition at line 79 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetKey()

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

Definition at line 65 of file crypter.cpp.

Here is the caller graph for this function:

◆ SetKeyFromPassphrase()

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

Definition at line 41 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

◆ wallet_crypto_tests::TestCrypter

friend class wallet_crypto_tests::TestCrypter
friend

Definition at line 66 of file crypter.h.

Member Data Documentation

◆ fKeySet

bool CCrypter::fKeySet
private

Definition at line 71 of file crypter.h.

◆ vchIV

std::vector<uint8_t, secure_allocator<uint8_t> > CCrypter::vchIV
private

Definition at line 70 of file crypter.h.

◆ vchKey

std::vector<uint8_t, secure_allocator<uint8_t> > CCrypter::vchKey
private

Definition at line 69 of file crypter.h.


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