Bitcoin
|
#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_tests::TestCrypter |
Encryption/decryption context with key information
|
inline |
|
inline |
|
private |
|
inline |
bool CCrypter::Decrypt | ( | const std::vector< unsigned char > & | vchCiphertext, |
CKeyingMaterial & | vchPlaintext | ||
) | const |
bool CCrypter::Encrypt | ( | const CKeyingMaterial & | vchPlaintext, |
std::vector< unsigned char > & | vchCiphertext | ||
) | const |
bool CCrypter::SetKey | ( | const CKeyingMaterial & | chNewKey, |
const std::vector< unsigned char > & | chNewIV | ||
) |
bool CCrypter::SetKeyFromPassphrase | ( | const SecureString & | strKeyData, |
const std::vector< unsigned char > & | chSalt, | ||
const unsigned int | nRounds, | ||
const unsigned int | nDerivationMethod | ||
) |
|
friend |
|
private |
|
private |
|
private |