Lines Matching refs:mctx

75 	struct michael_mic_ctx *mctx = ctx;  in michael_init()  local
76 mctx->pending_len = 0; in michael_init()
82 struct michael_mic_ctx *mctx = ctx; in michael_update() local
84 if (mctx->pending_len) { in michael_update()
85 int flen = 4 - mctx->pending_len; in michael_update()
88 memcpy(&mctx->pending[mctx->pending_len], data, flen); in michael_update()
89 mctx->pending_len += flen; in michael_update()
93 if (mctx->pending_len < 4) in michael_update()
96 mctx->l ^= get_le32(mctx->pending); in michael_update()
97 michael_block(mctx->l, mctx->r); in michael_update()
98 mctx->pending_len = 0; in michael_update()
102 mctx->l ^= get_le32(data); in michael_update()
103 michael_block(mctx->l, mctx->r); in michael_update()
109 mctx->pending_len = len; in michael_update()
110 memcpy(mctx->pending, data, len); in michael_update()
117 struct michael_mic_ctx *mctx = ctx; in michael_final() local
118 u8 *data = mctx->pending; in michael_final()
121 switch (mctx->pending_len) { in michael_final()
123 mctx->l ^= 0x5a; in michael_final()
126 mctx->l ^= data[0] | 0x5a00; in michael_final()
129 mctx->l ^= data[0] | (data[1] << 8) | 0x5a0000; in michael_final()
132 mctx->l ^= data[0] | (data[1] << 8) | (data[2] << 16) | in michael_final()
136 michael_block(mctx->l, mctx->r); in michael_final()
138 michael_block(mctx->l, mctx->r); in michael_final()
140 put_le32(out, mctx->l); in michael_final()
141 put_le32(out + 4, mctx->r); in michael_final()
148 struct michael_mic_ctx *mctx = ctx; in michael_setkey() local
154 mctx->l = get_le32(key); in michael_setkey()
155 mctx->r = get_le32(key + 4); in michael_setkey()