aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2015-03-20 01:27:50 -0400
committerPieter Wuille <pieter.wuille@gmail.com>2016-05-13 10:23:04 +0200
commit34ed64a404fb6da691f67f00f47c4dd748e3e428 (patch)
tree30eff0657636b64b806ac9d426b5ebe1ccc8b285 /src/wallet/crypter.h
parent0a36b9af281e31b080ca0835eec7704097527bda (diff)
downloadbitcoin-34ed64a404fb6da691f67f00f47c4dd748e3e428.tar.xz
crypter: add tests for crypter
Verify that results correct (match known values), consistent (encrypt->decrypt matches the original), and compatible with the previous openssl implementation. Also check that failed encrypts/decrypts fail the exact same way as openssl.
Diffstat (limited to 'src/wallet/crypter.h')
-rw-r--r--src/wallet/crypter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h
index 16f2ba6220..5d0a4a3305 100644
--- a/src/wallet/crypter.h
+++ b/src/wallet/crypter.h
@@ -67,9 +67,15 @@ public:
typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
+namespace wallet_crypto
+{
+ class TestCrypter;
+}
+
/** Encryption/decryption context with key information */
class CCrypter
{
+friend class wallet_crypto::TestCrypter; // for test access to chKey/chIV
private:
unsigned char chKey[WALLET_CRYPTO_KEY_SIZE];
unsigned char chIV[WALLET_CRYPTO_IV_SIZE];