From b5b3c744778ed0cbceb03f2f8dbbec33d2fd0e94 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 27 Feb 2024 10:40:23 +0000 Subject: Make functions that don't use `this` static. --- modules/encryption/enc_bcrypt.cpp | 2 +- modules/encryption/enc_md5.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/encryption') 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(input[j]) | (static_cast(input[j + 1]) << 8) | (static_cast(input[j + 2]) << 16) | (static_cast(input[j + 3]) << 24); -- cgit