51 #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
52 #define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
53 #define H(x, y, z) (((x) ^ (y)) ^ (z))
54 #define H2(x, y, z) ((x) ^ ((y) ^ (z)))
55 #define I(x, y, z) ((y) ^ ((x) | ~(z)))
60 #define STEP(f, a, b, c, d, x, t, s) \
61 (a) += f((b), (c), (d)) + (x) + (t); \
62 (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
80 #if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
82 (*(MD5_u32plus *)&ptr[(n) * 4])
88 (MD5_u32plus)ptr[(n) * 4] | \
89 ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
90 ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
91 ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
100 static const void *body(
MD5_CTX *ctx,
const void *
data,
unsigned long size)
102 const unsigned char *ptr;
106 ptr = (
const unsigned char *)
data;
197 }
while (
size -= 64);
221 unsigned long used, available;
224 if ((ctx->
lo = (saved_lo +
size) & 0x1fffffff) < saved_lo)
228 used = saved_lo & 0x3f;
231 available = 64 - used;
233 if (
size < available) {
239 data = (
const unsigned char *)
data + available;
241 body(ctx, ctx->
buffer, 64);
252 #define OUT(dst, src) \
253 (dst)[0] = (unsigned char)(src); \
254 (dst)[1] = (unsigned char)((src) >> 8); \
255 (dst)[2] = (unsigned char)((src) >> 16); \
256 (dst)[3] = (unsigned char)((src) >> 24);
260 unsigned long used, available;
262 used = ctx->
lo & 0x3f;
264 ctx->
buffer[used++] = 0x80;
266 available = 64 - used;
269 memset(&ctx->
buffer[used], 0, available);
270 body(ctx, ctx->
buffer, 64);
275 memset(&ctx->
buffer[used], 0, available - 8);
281 body(ctx, ctx->
buffer, 64);
288 memset(ctx, 0,
sizeof(*ctx));
void MD5_Init(MD5_CTX *ctx)
#define STEP(f, a, b, c, d, x, t, s)
void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
void MD5_Final(unsigned char *result, MD5_CTX *ctx)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data