diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2015-03-20 01:24:12 -0400 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-05-13 10:23:04 +0200 |
commit | 976f9ec2645242032d34ab68a60d963f2ac586d8 (patch) | |
tree | b5c5f3607fe10057dbc6a1385b5a08e7b6d9cbb2 /src/wallet/crypter.h | |
parent | 9049cde4d962862f507f9ddf1c0dbd49ea04be51 (diff) |
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 3457d40ffd..16f2ba6220 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; |