summaryrefslogtreecommitdiff
path: root/src/modules/m_md5.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-11 09:41:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-11 09:41:58 +0000
commit5db1d322be106c8462dc691072f9415dc0766ed4 (patch)
tree311cb5e6d5307d3e2b77652a9a2461a324c5ab2e /src/modules/m_md5.cpp
parent0626e6a68af3327ecfda4467f2dd09d4e729773d (diff)
Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a note to webirc that needs looking at.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_md5.cpp')
-rw-r--r--src/modules/m_md5.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp
index d39910838..b88258368 100644
--- a/src/modules/m_md5.cpp
+++ b/src/modules/m_md5.cpp
@@ -61,10 +61,10 @@ class ModuleMD5 : public Module
} while (--words);
}
- void MD5Init(MD5Context *ctx, unsigned int* key = NULL)
+ void MD5Init(MD5Context *ctx, unsigned int* ikey = NULL)
{
/* These are the defaults for md5 */
- if (!key)
+ if (!ikey)
{
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
@@ -73,10 +73,10 @@ class ModuleMD5 : public Module
}
else
{
- ctx->buf[0] = key[0];
- ctx->buf[1] = key[1];
- ctx->buf[2] = key[2];
- ctx->buf[3] = key[3];
+ ctx->buf[0] = ikey[0];
+ ctx->buf[1] = ikey[1];
+ ctx->buf[2] = ikey[2];
+ ctx->buf[3] = ikey[3];
}
ctx->bytes[0] = 0;
@@ -236,20 +236,20 @@ class ModuleMD5 : public Module
}
- void MyMD5(void *dest, void *orig, int len, unsigned int* key)
+ void MyMD5(void *dest, void *orig, int len, unsigned int* ikey)
{
MD5Context context;
- MD5Init(&context, key);
+ MD5Init(&context, ikey);
MD5Update(&context, (const unsigned char*)orig, len);
MD5Final((unsigned char*)dest, &context);
}
- void GenHash(const char* src, char* dest, const char* xtab, unsigned int* key)
+ void GenHash(const char* src, char* dest, const char* xtab, unsigned int* ikey)
{
unsigned char bytes[16];
- MyMD5((char*)bytes, (void*)src, strlen(src), key);
+ MyMD5((char*)bytes, (void*)src, strlen(src), ikey);
for (int i = 0; i < 16; i++)
{