Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/crypter.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | CMasterKey() { | ||||
nDeriveIterations = 25000; | nDeriveIterations = 25000; | ||||
nDerivationMethod = 0; | nDerivationMethod = 0; | ||||
vchOtherDerivationParameters = std::vector<uint8_t>(0); | vchOtherDerivationParameters = std::vector<uint8_t>(0); | ||||
} | } | ||||
}; | }; | ||||
typedef std::vector<uint8_t, secure_allocator<uint8_t>> CKeyingMaterial; | typedef std::vector<uint8_t, secure_allocator<uint8_t>> CKeyingMaterial; | ||||
namespace wallet_crypto { | namespace wallet_crypto_tests { | ||||
class TestCrypter; | class TestCrypter; | ||||
} | } | ||||
/** Encryption/decryption context with key information */ | /** Encryption/decryption context with key information */ | ||||
class CCrypter { | class CCrypter { | ||||
// for test access to chKey/chIV | // for test access to chKey/chIV | ||||
friend class wallet_crypto::TestCrypter; | friend class wallet_crypto_tests::TestCrypter; | ||||
private: | private: | ||||
std::vector<uint8_t, secure_allocator<uint8_t>> vchKey; | std::vector<uint8_t, secure_allocator<uint8_t>> vchKey; | ||||
std::vector<uint8_t, secure_allocator<uint8_t>> vchIV; | std::vector<uint8_t, secure_allocator<uint8_t>> vchIV; | ||||
bool fKeySet; | bool fKeySet; | ||||
int BytesToKeySHA512AES(const std::vector<uint8_t> &chSalt, | int BytesToKeySHA512AES(const std::vector<uint8_t> &chSalt, | ||||
const SecureString &strKeyData, int count, | const SecureString &strKeyData, int count, | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |