Integer type name change.
[silc.git] / lib / silccrypt / md5.c
index 63514cd10f3c9684640d30e826aa1d47bd245d70..910939be1b091cc6f72fb28e1ee720007e0c8aa5 100644 (file)
@@ -54,19 +54,19 @@ SILC_HASH_API_CONTEXT_LEN(md5)
 #ifndef HIGHFIRST
 #define byteReverse(buf, len)  /* Nothing */
 #else
-void byteReverse(unsigned char *buf, uint32s);
+void byteReverse(unsigned char *buf, SilcUInt32s);
 
 #ifndef ASM_MD5
 /*
  * Note: this code is harmless on little-endian machines.
  */
-void byteReverse(unsigned char *buf, uint32s)
+void byteReverse(unsigned char *buf, SilcUInt32s)
 {
-       uint32 t;
+       SilcUInt32 t;
        do {
-               t = (uint32)((unsigned)buf[3]<<8 | buf[2]) << 16 |
+               t = (SilcUInt32)((unsigned)buf[3]<<8 | buf[2]) << 16 |
                            ((unsigned)buf[1]<<8 | buf[0]);
-               *(uint32 *)buf = t;
+               *(SilcUInt32 *)buf = t;
                buf += 4;
        } while (--longs);
 }
@@ -96,12 +96,12 @@ MD5Init(struct MD5Context *ctx)
 void
 MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
 {
-       uint32 t;
+       SilcUInt32 t;
 
        /* Update bitcount */
 
        t = ctx->bits[0];
-       if ((ctx->bits[0] = t + ((uint32)len << 3)) < t)
+       if ((ctx->bits[0] = t + ((SilcUInt32)len << 3)) < t)
                ctx->bits[1]++; /* Carry from low to high */
        ctx->bits[1] += len >> 29;
 
@@ -176,8 +176,8 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
        byteReverse(ctx->in, 14);
 
        /* Append length in bits and transform */
-       ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0];
-       ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1];
+       ((SilcUInt32 *)ctx->in)[ 14 ] = ctx->bits[0];
+       ((SilcUInt32 *)ctx->in)[ 15 ] = ctx->bits[1];
 
        MD5Transform(ctx->buf, ctx->in);
        byteReverse((unsigned char *)ctx->buf, 4);
@@ -205,10 +205,10 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
  * the data and converts bytes into longwords for this routine.
  */
 void
-MD5Transform(uint32 buf[4], const unsigned char kbuf[64])
+MD5Transform(SilcUInt32 buf[4], const unsigned char kbuf[64])
 {
-       register uint32 a, b, c, d, i;
-       uint32 in[16];
+       register SilcUInt32 a, b, c, d, i;
+       SilcUInt32 in[16];
 
        for (i = 0; i < 16; i++)
            SILC_GET32_MSB(in[i], kbuf + 4 * i);