aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/crypter.cpp')
-rw-r--r--src/wallet/crypter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp
index e2799c2d05..57a19fb5f2 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -112,7 +112,7 @@ bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vch
memcpy(chIV.data(), &nIV, WALLET_CRYPTO_IV_SIZE);
if(!cKeyCrypter.SetKey(vMasterKey, chIV))
return false;
- return cKeyCrypter.Encrypt(*((const CKeyingMaterial*)&vchPlaintext), vchCiphertext);
+ return cKeyCrypter.Encrypt(vchPlaintext, vchCiphertext);
}
bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext)