diff options
Diffstat (limited to 'src/crypter.h')
-rw-r--r-- | src/crypter.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/crypter.h b/src/crypter.h index 4134c1b49b..861c4f9441 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -1,13 +1,15 @@ -// Copyright (c) 2009-2012 The Bitcoin Developers +// Copyright (c) 2009-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef __CRYPTER_H__ #define __CRYPTER_H__ -#include "allocators.h" /* for SecureString */ -#include "key.h" +#include "allocators.h" #include "serialize.h" +class uint256; + const unsigned int WALLET_CRYPTO_KEY_SIZE = 32; const unsigned int WALLET_CRYPTO_SALT_SIZE = 8; @@ -88,16 +90,16 @@ public: // Try to keep the key data out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap) // Note that this does nothing about suspend-to-disk (which will put all our key data on disk) // Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process. - LockedPageManager::instance.LockRange(&chKey[0], sizeof chKey); - LockedPageManager::instance.LockRange(&chIV[0], sizeof chIV); + LockedPageManager::Instance().LockRange(&chKey[0], sizeof chKey); + LockedPageManager::Instance().LockRange(&chIV[0], sizeof chIV); } ~CCrypter() { CleanKey(); - LockedPageManager::instance.UnlockRange(&chKey[0], sizeof chKey); - LockedPageManager::instance.UnlockRange(&chIV[0], sizeof chIV); + LockedPageManager::Instance().UnlockRange(&chKey[0], sizeof chKey); + LockedPageManager::Instance().UnlockRange(&chIV[0], sizeof chIV); } }; |