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