43#define DXBC_CHECKSUM_BLOCK_SIZE 64
58#define F1(x, y, z) (z ^ (x & (y ^ z)))
59#define F2(x, y, z) F1(z, x, y)
60#define F3(x, y, z) (x ^ y ^ z)
61#define F4(x, y, z) (y ^ (x | ~z))
64#define MD5STEP(f, w, x, y, z, data, s) \
65 (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x)
74 unsigned int a,
b,
c,
d;
165 *(
unsigned int *)
buf =
t;
176 ctx->buf[0] = 0x67452301;
177 ctx->buf[1] = 0xefcdab89;
178 ctx->buf[2] = 0x98badcfe;
179 ctx->buf[3] = 0x10325476;
181 ctx->i[0] =
ctx->i[1] = 0;
195 if ((
ctx->i[0] =
t + (
len << 3)) <
t)
204 unsigned char *
p = (
unsigned char *)
ctx->in +
t;
296 ((
unsigned int *)
ctx->in)[14] =
ctx->i[0];
297 ((
unsigned int *)
ctx->in)[15] =
ctx->i[1];
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const DWORD padding[]
#define MD5STEP(f, w, x, y, z, data, s)
void vkd3d_compute_md5(const void *data, size_t size, uint32_t checksum[4], enum vkd3d_md5_variant variant)
static void md5_transform(unsigned int buf[4], const unsigned int in[16])
#define DXBC_CHECKSUM_BLOCK_SIZE
static void md5_final(struct md5_ctx *ctx, enum vkd3d_md5_variant variant)
static void byte_reverse(unsigned char *buf, unsigned longs)
static uint16_t vkd3d_make_u16(uint8_t low, uint8_t high)
static uint32_t vkd3d_make_u32(uint16_t low, uint16_t high)