summaryrefslogtreecommitdiff
path: root/modules/encryption
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-27 10:40:23 +0000
committerSadie Powell <sadie@witchery.services>2024-02-27 10:48:55 +0000
commitb5b3c744778ed0cbceb03f2f8dbbec33d2fd0e94 (patch)
treee6d8a7c143a11035be55ffffcdc97395eb5b4e25 /modules/encryption
parent73d4ac6de04a1035ac36182d3f269cc938c6bc19 (diff)
Make functions that don't use `this` static.
Diffstat (limited to 'modules/encryption')
-rw-r--r--modules/encryption/enc_bcrypt.cpp2
-rw-r--r--modules/encryption/enc_md5.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/enc_bcrypt.cpp
index 3dea3f2c6..76809ed4e 100644
--- a/modules/encryption/enc_bcrypt.cpp
+++ b/modules/encryption/enc_bcrypt.cpp
@@ -30,7 +30,7 @@ class EBCRYPT final
return salt;
}
- Anope::string Generate(const Anope::string &data, const Anope::string &salt)
+ static Anope::string Generate(const Anope::string &data, const Anope::string &salt)
{
char hash[64];
_crypt_blowfish_rn(data.c_str(), salt.c_str(), hash, sizeof(hash));
diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp
index 9bad9ade6..c5c9b857a 100644
--- a/modules/encryption/enc_md5.cpp
+++ b/modules/encryption/enc_md5.cpp
@@ -208,7 +208,7 @@ class MD5Context final
/* Encodes input (unsigned) into output (unsigned char). Assumes len is
* a multiple of 4.
*/
- void Encode(unsigned char *output, unsigned *input, unsigned len)
+ static void Encode(unsigned char *output, unsigned *input, unsigned len)
{
for (unsigned i = 0, j = 0; j < len; ++i, j += 4)
{
@@ -222,7 +222,7 @@ class MD5Context final
/* Decodes input (unsigned char) into output (unsigned). Assumes len is
* a multiple of 4.
*/
- void Decode(unsigned *output, const unsigned char *input, unsigned len)
+ static void Decode(unsigned *output, const unsigned char *input, unsigned len)
{
for (unsigned i = 0, j = 0; j < len; ++i, j += 4)
output[i] = static_cast<unsigned>(input[j]) | (static_cast<unsigned>(input[j + 1]) << 8) | (static_cast<unsigned>(input[j + 2]) << 16) | (static_cast<unsigned>(input[j + 3]) << 24);