Dash Core  0.12.2.1
P2P Digital Currency
CCrypter Class Reference

#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)
 
bool Decrypt (const std::vector< unsigned char > &vchCiphertext, CKeyingMaterial &vchPlaintext)
 
bool SetKey (const CKeyingMaterial &chNewKey, const std::vector< unsigned char > &chNewIV)
 
void CleanKey ()
 
 CCrypter ()
 
 ~CCrypter ()
 

Private Attributes

unsigned char chKey [WALLET_CRYPTO_KEY_SIZE]
 
unsigned char chIV [WALLET_CRYPTO_KEY_SIZE]
 
bool fKeySet
 

Detailed Description

Encryption/decryption context with key information

Definition at line 70 of file crypter.h.

Constructor & Destructor Documentation

◆ CCrypter()

CCrypter::CCrypter ( )
inline

Definition at line 90 of file crypter.h.

◆ ~CCrypter()

CCrypter::~CCrypter ( )
inline

Definition at line 101 of file crypter.h.

Member Function Documentation

◆ CleanKey()

void CCrypter::CleanKey ( )
inline

Definition at line 83 of file crypter.h.

Referenced by ~CCrypter().

◆ Decrypt()

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

Definition at line 81 of file crypter.cpp.

Referenced by CWallet::ChangeWalletPassphrase(), DecryptSecret(), and CWallet::Unlock().

◆ Encrypt()

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

◆ SetKey()

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

Definition at line 38 of file crypter.cpp.

Referenced by DecryptSecret(), and EncryptSecret().

◆ SetKeyFromPassphrase()

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

Member Data Documentation

◆ chIV

unsigned char CCrypter::chIV[WALLET_CRYPTO_KEY_SIZE]
private

Definition at line 74 of file crypter.h.

Referenced by CCrypter(), CleanKey(), Decrypt(), Encrypt(), SetKey(), SetKeyFromPassphrase(), and ~CCrypter().

◆ chKey

unsigned char CCrypter::chKey[WALLET_CRYPTO_KEY_SIZE]
private

Definition at line 73 of file crypter.h.

Referenced by CCrypter(), CleanKey(), Decrypt(), Encrypt(), SetKey(), SetKeyFromPassphrase(), and ~CCrypter().

◆ fKeySet

bool CCrypter::fKeySet
private

Definition at line 75 of file crypter.h.

Referenced by CCrypter(), CleanKey(), Decrypt(), Encrypt(), SetKey(), and SetKeyFromPassphrase().


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