Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
CCrypter Class Reference

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

#include <crypter.h>

+ Collaboration diagram for CCrypter:

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 67 of file crypter.h.

Constructor & Destructor Documentation

CCrypter::CCrypter ( )
inline

Definition at line 87 of file crypter.h.

References LockedPageManager::Instance(), and LockedPageManagerBase< Locker >::LockRange().

+ Here is the call graph for this function:

CCrypter::~CCrypter ( )
inline

Definition at line 98 of file crypter.h.

References CleanKey(), LockedPageManager::Instance(), and LockedPageManagerBase< Locker >::UnlockRange().

+ Here is the call graph for this function:

Member Function Documentation

void CCrypter::CleanKey ( )
inline

Definition at line 80 of file crypter.h.

Referenced by ~CCrypter().

+ Here is the caller graph for this function:

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

Definition at line 75 of file crypter.cpp.

References chIV, chKey, and fKeySet.

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

+ Here is the caller graph for this function:

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

Definition at line 48 of file crypter.cpp.

References chIV, chKey, and fKeySet.

Referenced by CWallet::ChangeWalletPassphrase(), EncryptSecret(), and CWallet::EncryptWallet().

+ Here is the caller graph for this function:

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

Definition at line 36 of file crypter.cpp.

References chIV, chKey, fKeySet, memcpy(), and WALLET_CRYPTO_KEY_SIZE.

Referenced by DecryptSecret(), and EncryptSecret().

+ 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 15 of file crypter.cpp.

References chIV, chKey, fKeySet, WALLET_CRYPTO_KEY_SIZE, and WALLET_CRYPTO_SALT_SIZE.

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

+ Here is the caller graph for this function:

Member Data Documentation

unsigned char CCrypter::chIV[WALLET_CRYPTO_KEY_SIZE]
private

Definition at line 71 of file crypter.h.

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

unsigned char CCrypter::chKey[WALLET_CRYPTO_KEY_SIZE]
private

Definition at line 70 of file crypter.h.

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

bool CCrypter::fKeySet
private

Definition at line 72 of file crypter.h.

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


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