Lines Matching defs:mctx
69 struct md5_state *mctx = shash_desc_ctx(desc);
71 mctx->hash[0] = MD5_H0;
72 mctx->hash[1] = MD5_H1;
73 mctx->hash[2] = MD5_H2;
74 mctx->hash[3] = MD5_H3;
75 cpu_to_le32_array(mctx->hash, 4);
76 mctx->byte_count = 0;
84 struct md5_state *mctx = shash_desc_ctx(desc);
85 const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
89 mctx->byte_count += len;
92 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
97 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data,
101 octeon_md5_store_hash(mctx);
103 octeon_md5_transform(mctx->block);
107 while (len >= sizeof(mctx->block)) {
109 data += sizeof(mctx->block);
110 len -= sizeof(mctx->block);
113 octeon_md5_read_hash(mctx);
116 memcpy(mctx->block, data, len);
123 struct md5_state *mctx = shash_desc_ctx(desc);
124 const unsigned int offset = mctx->byte_count & 0x3f;
125 char *p = (char *)mctx->block + offset;
133 octeon_md5_store_hash(mctx);
137 octeon_md5_transform(mctx->block);
138 p = (char *)mctx->block;
143 mctx->block[14] = mctx->byte_count << 3;
144 mctx->block[15] = mctx->byte_count >> 29;
145 cpu_to_le32_array(mctx->block + 14, 2);
146 octeon_md5_transform(mctx->block);
148 octeon_md5_read_hash(mctx);
151 memcpy(out, mctx->hash, sizeof(mctx->hash));
152 memset(mctx, 0, sizeof(*mctx));