diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index b13699572c4..f43e07bc6bc 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -250,10 +250,10 @@ CDBWrapper::CDBWrapper(const DBParams& params) } assert(!m_obfuscation); // Needed for unobfuscated Read()/Write() below - if (!Read(OBFUSCATION_KEY_KEY, m_obfuscation) && params.obfuscate && IsEmpty()) { + if (!Read(OBFUSCATION_KEY, m_obfuscation) && params.obfuscate && IsEmpty()) { // Generate, write and read back the new obfuscation key, making sure we don't obfuscate the key itself - Write(OBFUSCATION_KEY_KEY, FastRandomContext{}.randbytes(Obfuscation::KEY_SIZE)); - Read(OBFUSCATION_KEY_KEY, m_obfuscation); + Write(OBFUSCATION_KEY, FastRandomContext{}.randbytes(Obfuscation::KEY_SIZE)); + Read(OBFUSCATION_KEY, m_obfuscation); LogInfo("Wrote new obfuscation key for %s: %s", fs::PathToString(params.path), m_obfuscation.HexKey()); } LogInfo("Using obfuscation key for %s: %s", fs::PathToString(params.path), m_obfuscation.HexKey()); diff --git a/src/dbwrapper.h b/src/dbwrapper.h index c5d49404861..b9b98bd96ad 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -189,7 +189,7 @@ private: Obfuscation m_obfuscation; //! obfuscation key storage key, null-prefixed to avoid collisions - inline static const std::string OBFUSCATION_KEY_KEY{"\000obfuscate_key", 14}; // explicit size to avoid truncation at leading \0 + inline static const std::string OBFUSCATION_KEY{"\000obfuscate_key", 14}; // explicit size to avoid truncation at leading \0 //! path to filesystem storage const fs::path m_path;