diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2015-03-20 01:05:47 -0400 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-05-13 10:23:03 +0200 |
commit | 1c391a5866e1342617b51041afebee2215e9a30c (patch) | |
tree | 6edb45995b9cbd64d8b275ba200243d7d8ae91c0 /src/wallet/crypter.h | |
parent | daa384120a63542257d4ca73047d775f16fac654 (diff) |
crypter: fix the stored initialization vector size
AES IV's are 16bytes, not 32. This was harmless but confusing.
Add WALLET_CRYPTO_IV_SIZE to make its usage explicit.
Diffstat (limited to 'src/wallet/crypter.h')
-rw-r--r-- | src/wallet/crypter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index eb06a7866a..b4727ac8ac 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -13,6 +13,7 @@ class uint256; const unsigned int WALLET_CRYPTO_KEY_SIZE = 32; const unsigned int WALLET_CRYPTO_SALT_SIZE = 8; +const unsigned int WALLET_CRYPTO_IV_SIZE = 16; /** * Private key encryption is done based on a CMasterKey, @@ -71,7 +72,7 @@ class CCrypter { private: unsigned char chKey[WALLET_CRYPTO_KEY_SIZE]; - unsigned char chIV[WALLET_CRYPTO_KEY_SIZE]; + unsigned char chIV[WALLET_CRYPTO_IV_SIZE]; bool fKeySet; public: |