Home | History | Annotate | Download | only in crc

Lines Matching refs:mctx

91 void fio_md5_init(struct fio_md5_ctx *mctx)
93 mctx->hash[0] = 0x67452301;
94 mctx->hash[1] = 0xefcdab89;
95 mctx->hash[2] = 0x98badcfe;
96 mctx->hash[3] = 0x10325476;
99 void fio_md5_update(struct fio_md5_ctx *mctx, const uint8_t *data,
102 const uint32_t avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
104 mctx->byte_count += len;
107 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
112 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
115 md5_transform(mctx->hash, mctx->block);
119 while (len >= sizeof(mctx->block)) {
120 memcpy(mctx->block, data, sizeof(mctx->block));
121 md5_transform(mctx->hash, mctx->block);
122 data += sizeof(mctx->block);
123 len -= sizeof(mctx->block);
126 memcpy(mctx->block, data, len);