diff options
| author | Cory Fields <[email protected]> | 2015-03-20 01:24:12 -0400 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-05-13 10:23:04 +0200 |
| commit | 976f9ec2645242032d34ab68a60d963f2ac586d8 (patch) | |
| tree | b5c5f3607fe10057dbc6a1385b5a08e7b6d9cbb2 /src/wallet/crypter.h | |
| parent | crypter: hook up the new aes cbc classes (diff) | |
| download | discoin-976f9ec2645242032d34ab68a60d963f2ac586d8.tar.xz discoin-976f9ec2645242032d34ab68a60d963f2ac586d8.zip | |
crypter: add a BytesToKey clone to replace the use of openssl
BytesToKeySHA512AES should be functionally identical to EVP_BytesToKey, but
drops the dependency on openssl.
Diffstat (limited to 'src/wallet/crypter.h')
| -rw-r--r-- | src/wallet/crypter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index 3457d40ff..16f2ba622 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -75,6 +75,8 @@ private: unsigned char chIV[WALLET_CRYPTO_IV_SIZE]; bool fKeySet; + int BytesToKeySHA512AES(const std::vector<unsigned char>& chSalt, const SecureString& strKeyData, int count, unsigned char *key,unsigned char *iv) const; + public: 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; |