aboutsummaryrefslogtreecommitdiff
path: root/src/crypter.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <[email protected]>2013-06-03 15:18:41 +0200
committerJonas Schnelli <[email protected]>2013-06-03 15:18:41 +0200
commit39fe9de6b2b255969971beca8fa25a33ad2e5750 (patch)
tree6686041f6b801d0ea5185b026a480a5be61510e6 /src/crypter.cpp
parentMaxOSX: settings fixes (#2371) (diff)
parentMerge pull request #2672 from Diapolo/Qt_testnet (diff)
downloaddiscoin-39fe9de6b2b255969971beca8fa25a33ad2e5750.tar.xz
discoin-39fe9de6b2b255969971beca8fa25a33ad2e5750.zip
Merge branch 'master' of git://github.com/bitcoin/bitcoin into prefsFix
Signed-off-by: Jonas Schnelli <[email protected]> Conflicts: bitcoin-qt.pro
Diffstat (limited to 'src/crypter.cpp')
-rw-r--r--src/crypter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypter.cpp b/src/crypter.cpp
index a2b62a87c..32baabd67 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -100,17 +100,17 @@ bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingM
}
-bool EncryptSecret(CKeyingMaterial& vMasterKey, const CSecret &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext)
+bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext)
{
CCrypter cKeyCrypter;
std::vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);
memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE);
if(!cKeyCrypter.SetKey(vMasterKey, chIV))
return false;
- return cKeyCrypter.Encrypt((CKeyingMaterial)vchPlaintext, vchCiphertext);
+ return cKeyCrypter.Encrypt(*((const CKeyingMaterial*)&vchPlaintext), vchCiphertext);
}
-bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CSecret& vchPlaintext)
+bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext)
{
CCrypter cKeyCrypter;
std::vector<unsigned char> chIV(WALLET_CRYPTO_KEY_SIZE);