aboutsummaryrefslogtreecommitdiff
path: root/src/crypter.h
diff options
context:
space:
mode:
authorMichael Ford <fanquake@gmail.com>2014-10-31 08:43:19 +0800
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-21 14:44:21 +0100
commitfa94b9d5623cfd16aa594c28432f25a17b0efb0e (patch)
tree7c94530e14c0c3230883601157ab1cd81257806f /src/crypter.h
parentf2ada138c28bf6b4f4a668c4ab60b55d124c9823 (diff)
downloadbitcoin-fa94b9d5623cfd16aa594c28432f25a17b0efb0e.tar.xz
Convert remaining comments in /src to doxygen format
- Update comments in checkpoints to be doxygen compatible - Update comments in checkqueue to be doxygen compatible - Update coins to be doxygen compatible - Fix comment typo in crypter.h - Update licenses/copyright dates Closes #5325 #5184 #5183 #5182
Diffstat (limited to 'src/crypter.h')
-rw-r--r--src/crypter.h49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/crypter.h b/src/crypter.h
index b589987c4f..f7018cfdbe 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,20 +14,20 @@ class uint256;
const unsigned int WALLET_CRYPTO_KEY_SIZE = 32;
const unsigned int WALLET_CRYPTO_SALT_SIZE = 8;
-/*
-Private key encryption is done based on a CMasterKey,
-which holds a salt and random encryption key.
-
-CMasterKeys are encrypted using AES-256-CBC using a key
-derived using derivation method nDerivationMethod
-(0 == EVP_sha512()) and derivation iterations nDeriveIterations.
-vchOtherDerivationParameters is provided for alternative algorithms
-which may require more parameters (such as scrypt).
-
-Wallet Private Keys are then encrypted using AES-256-CBC
-with the double-sha256 of the public key as the IV, and the
-master key's key as the encryption key (see keystore.[ch]).
-*/
+/**
+ * Private key encryption is done based on a CMasterKey,
+ * which holds a salt and random encryption key.
+ *
+ * CMasterKeys are encrypted using AES-256-CBC using a key
+ * derived using derivation method nDerivationMethod
+ * (0 == EVP_sha512()) and derivation iterations nDeriveIterations.
+ * vchOtherDerivationParameters is provided for alternative algorithms
+ * which may require more parameters (such as scrypt).
+ *
+ * Wallet Private Keys are then encrypted using AES-256-CBC
+ * with the double-sha256 of the public key as the IV, and the
+ * master key's key as the encryption key (see keystore.[ch]).
+ */
/** Master key for wallet encryption */
class CMasterKey
@@ -35,12 +35,12 @@ class CMasterKey
public:
std::vector<unsigned char> vchCryptedKey;
std::vector<unsigned char> vchSalt;
- // 0 = EVP_sha512()
- // 1 = scrypt()
+ //! 0 = EVP_sha512()
+ //! 1 = scrypt()
unsigned int nDerivationMethod;
unsigned int nDeriveIterations;
- // Use this for more parameters to key derivation,
- // such as the various parameters to scrypt
+ //! Use this for more parameters to key derivation,
+ //! such as the various parameters to scrypt
std::vector<unsigned char> vchOtherDerivationParameters;
ADD_SERIALIZE_METHODS;
@@ -120,17 +120,17 @@ private:
CKeyingMaterial vMasterKey;
- // if fUseCrypto is true, mapKeys must be empty
- // if fUseCrypto is false, vMasterKey must be empty
+ //! if fUseCrypto is true, mapKeys must be empty
+ //! if fUseCrypto is false, vMasterKey must be empty
bool fUseCrypto;
- // keeps track of whether Unlock has run a thourough check before
+ //! keeps track of whether Unlock has run a thorough check before
bool fDecryptionThoroughlyChecked;
protected:
bool SetCrypted();
- // will encrypt previously unencrypted keys
+ //! will encrypt previously unencrypted keys
bool EncryptKeys(CKeyingMaterial& vMasterKeyIn);
bool Unlock(const CKeyingMaterial& vMasterKeyIn);
@@ -189,7 +189,8 @@ public:
}
}
- /* Wallet status (encrypted, locked) changed.
+ /**
+ * Wallet status (encrypted, locked) changed.
* Note: Called without locks held.
*/
boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;