Lines Matching refs:buf
145 uint32 buf[4]; member
157 static void byteReverse (unsigned char *buf, unsigned longs){ in byteReverse() argument
160 t = (uint32)((unsigned)buf[3]<<8 | buf[2]) << 16 | in byteReverse()
161 ((unsigned)buf[1]<<8 | buf[0]); in byteReverse()
162 *(uint32 *)buf = t; in byteReverse()
163 buf += 4; in byteReverse()
183 static void MD5Transform(uint32 buf[4], const uint32 in[16]){ in MD5Transform()
186 a = buf[0]; in MD5Transform()
187 b = buf[1]; in MD5Transform()
188 c = buf[2]; in MD5Transform()
189 d = buf[3]; in MD5Transform()
259 buf[0] += a; in MD5Transform()
260 buf[1] += b; in MD5Transform()
261 buf[2] += c; in MD5Transform()
262 buf[3] += d; in MD5Transform()
271 ctx->buf[0] = 0x67452301; in MD5Init()
272 ctx->buf[1] = 0xefcdab89; in MD5Init()
273 ctx->buf[2] = 0x98badcfe; in MD5Init()
274 ctx->buf[3] = 0x10325476; in MD5Init()
284 void MD5Update(MD5Context *ctx, const unsigned char *buf, unsigned int len){ in MD5Update() argument
303 memcpy(p, buf, len); in MD5Update()
306 memcpy(p, buf, t); in MD5Update()
308 MD5Transform(ctx->buf, (uint32 *)ctx->u.in); in MD5Update()
309 buf += t; in MD5Update()
316 memcpy(ctx->u.in, buf, 64); in MD5Update()
318 MD5Transform(ctx->buf, (uint32 *)ctx->u.in); in MD5Update()
319 buf += 64; in MD5Update()
325 memcpy(ctx->u.in, buf, len); in MD5Update()
352 MD5Transform(ctx->buf, (uint32 *)ctx->u.in); in MD5Final()
366 MD5Transform(ctx->buf, (uint32 *)ctx->u.in); in MD5Final()
367 byteReverse((unsigned char *)ctx->buf, 4); in MD5Final()
368 memcpy(digest, ctx->buf, 16); in MD5Final()