Skip to content

Commit 914fad1

Browse files
committed
Make KEY_SIZE a compile-time constant
1 parent f87e8f5 commit 914fad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/httprpc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static bool multiUserAuthorized(std::string strUserPass)
112112
std::string strSalt = vFields[1];
113113
std::string strHash = vFields[2];
114114

115-
unsigned int KEY_SIZE = 32;
115+
static const unsigned int KEY_SIZE = 32;
116116
unsigned char out[KEY_SIZE];
117117

118118
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);

0 commit comments

Comments
 (0)