summaryrefslogtreecommitdiff
path: root/lib/libalpm/md5.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-15 19:31:03 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-15 19:31:03 +0000
commitd37ad048732fbcef38aec001993553896dbe4198 (patch)
treec80472214aae0cd94c32ac00d613d38d51bc1adf /lib/libalpm/md5.c
parent83381bd21748d79f46247fab17877bc5c440a8de (diff)
downloadpacman-d37ad048732fbcef38aec001993553896dbe4198.tar.xz
Merged frugalware changes (too many to list). Also added some config file
handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
Diffstat (limited to 'lib/libalpm/md5.c')
-rw-r--r--lib/libalpm/md5.c40
1 files changed, 5 insertions, 35 deletions
diff --git a/lib/libalpm/md5.c b/lib/libalpm/md5.c
index b4f5a159..7e4fd677 100644
--- a/lib/libalpm/md5.c
+++ b/lib/libalpm/md5.c
@@ -49,8 +49,6 @@ documentation and/or software.
static void MD5Transform(UINT4 [4], unsigned char [64]);
static void Encode(unsigned char *, UINT4 *, unsigned int);
static void Decode(UINT4 *, unsigned char *, unsigned int);
-/* static void MD5_memcpy(POINTER, POINTER, unsigned int); */
-/* static void MD5_memset(POINTER, int, unsigned int); */
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -95,7 +93,7 @@ Rotation is separate from addition to prevent recomputation.
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
-void MD5Init (context)
+void _alpm_MD5Init (context)
MD5_CTX *context; /* context */
{
context->count[0] = context->count[1] = 0;
@@ -111,7 +109,7 @@ MD5_CTX *context; /* context */
operation, processing another message block, and updating the
context.
*/
-void MD5Update (context, input, inputLen)
+void _alpm_MD5Update (context, input, inputLen)
MD5_CTX *context; /* context */
unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
@@ -151,7 +149,7 @@ unsigned int inputLen; /* length of input block */
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
-void MD5Final (digest, context)
+void _alpm_MD5Final (digest, context)
unsigned char digest[16]; /* message digest */
MD5_CTX *context; /* context */
{
@@ -165,10 +163,10 @@ MD5_CTX *context; /* context */
*/
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
- MD5Update (context, PADDING, padLen);
+ _alpm_MD5Update (context, PADDING, padLen);
/* Append length (before padding) */
- MD5Update (context, bits, 8);
+ _alpm_MD5Update (context, bits, 8);
/* Store state in digest */
Encode (digest, context->state, 16);
@@ -305,32 +303,4 @@ unsigned int len;
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
-/* Note: Replace "for loop" with standard memcpy if possible.
- */
-
-/* static void MD5_memcpy (output, input, len)
-POINTER output;
-POINTER input;
-unsigned int len;
-{
- unsigned int i;
-
- for (i = 0; i < len; i++)
-
- output[i] = input[i];
-}
-*/
-/* Note: Replace "for loop" with standard memset if possible.
- */
-/* static void MD5_memset (output, value, len)
-POINTER output;
-int value;
-unsigned int len;
-{
- unsigned int i;
-
- for (i = 0; i < len; i++)
- ((char *)output)[i] = (char)value;
-}
-*/
/* vim: set ts=2 sw=2 noet: */