aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2015-03-26 17:37:29 -0400
committerPieter Wuille <[email protected]>2016-05-13 10:23:04 +0200
commitfb96831c1ff767cd86099f66127fa4dc1ec6e277 (patch)
treeccd4d39752e118650a065401440e98bd09bf9a62 /src/wallet/crypter.cpp
parentcrypter: fix the stored initialization vector size (diff)
downloaddiscoin-fb96831c1ff767cd86099f66127fa4dc1ec6e277.tar.xz
discoin-fb96831c1ff767cd86099f66127fa4dc1ec6e277.zip
crypter: constify encrypt/decrypt
This makes CCrypter easier to pass aroundf for tests
Diffstat (limited to 'src/wallet/crypter.cpp')
-rw-r--r--src/wallet/crypter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp
index 8f555579f..e37a9c4c8 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -47,7 +47,7 @@ bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigne
return true;
}
-bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext)
+bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const
{
if (!fKeySet)
return false;
@@ -74,7 +74,7 @@ bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned
return true;
}
-bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext)
+bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext) const
{
if (!fKeySet)
return false;