aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.h
diff options
context:
space:
mode:
authorHodlinator <172445034+hodlinator@users.noreply.github.com>2024-08-20 23:44:57 +0200
committerHodlinator <172445034+hodlinator@users.noreply.github.com>2024-08-28 19:09:51 +0200
commitbd0830bbd4105af1953b6b897ba6bc35098cbe13 (patch)
treed1d823e011bc446119a7854e9028846ba0d7bf9f /src/wallet/crypter.h
parentd99c81697148a9695c0fba614dff9fbe728a3acd (diff)
downloadbitcoin-bd0830bbd4105af1953b6b897ba6bc35098cbe13.tar.xz
refactor: de-Hungarianize CCrypter
Beyond renaming it also adjusts whitespace and adds braces to conform to current doc/developer-notes.md. TestEncrypt: Change iterator type to auto in ahead of vector -> span conversion. Only touches functions that will be modified in next commit.
Diffstat (limited to 'src/wallet/crypter.h')
-rw-r--r--src/wallet/crypter.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h
index b776a9c497..4c3d49175c 100644
--- a/src/wallet/crypter.h
+++ b/src/wallet/crypter.h
@@ -75,13 +75,13 @@ private:
std::vector<unsigned char, secure_allocator<unsigned char>> vchIV;
bool fKeySet;
- int BytesToKeySHA512AES(const std::vector<unsigned char>& chSalt, const SecureString& strKeyData, int count, unsigned char *key,unsigned char *iv) const;
+ int BytesToKeySHA512AES(const std::vector<unsigned char>& salt, const SecureString& key_data, int count, unsigned char* key, unsigned char* iv) const;
public:
- bool SetKeyFromPassphrase(const SecureString &strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod);
+ bool SetKeyFromPassphrase(const SecureString& key_data, const std::vector<unsigned char>& salt, const unsigned int rounds, const unsigned int derivation_method);
bool Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const;
- bool Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial& vchPlaintext) const;
- bool SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV);
+ bool Decrypt(const std::vector<unsigned char>& ciphertext, CKeyingMaterial& plaintext) const;
+ bool SetKey(const CKeyingMaterial& new_key, const std::vector<unsigned char>& new_iv);
void CleanKey()
{
@@ -104,8 +104,8 @@ public:
};
bool EncryptSecret(const CKeyingMaterial& vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256& nIV, std::vector<unsigned char> &vchCiphertext);
-bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCiphertext, const uint256& nIV, CKeyingMaterial& vchPlaintext);
-bool DecryptKey(const CKeyingMaterial& vMasterKey, const std::vector<unsigned char>& vchCryptedSecret, const CPubKey& vchPubKey, CKey& key);
+bool DecryptSecret(const CKeyingMaterial& master_key, const std::vector<unsigned char>& ciphertext, const uint256& iv, CKeyingMaterial& plaintext);
+bool DecryptKey(const CKeyingMaterial& master_key, const std::vector<unsigned char>& crypted_secret, const CPubKey& pub_key, CKey& key);
} // namespace wallet
#endif // BITCOIN_WALLET_CRYPTER_H