Lines Matching defs:ctx
33 CC_INLINE void ccecb_init(const struct ccmode_ecb *mode, ccecb_ctx *ctx,
36 mode->init(mode, ctx, key_len, key);
39 CC_INLINE void ccecb_update(const struct ccmode_ecb *mode, const ccecb_ctx *ctx,
43 mode->ecb(ctx, numBlocks, in, out);
51 ccecb_ctx_decl(mode->size, ctx);
52 mode->init(mode, ctx, key_len, key);
53 mode->ecb(ctx, numBlocks, in, out);
54 ccecb_ctx_clear(mode->size, ctx);
93 CC_INLINE void cccbc_init(const struct ccmode_cbc *mode, cccbc_ctx *ctx,
96 mode->init(mode, ctx, key_len, key);
107 CC_INLINE void cccbc_update(const struct ccmode_cbc *mode, cccbc_ctx *ctx, cccbc_iv *iv,
110 mode->cbc(ctx, iv, nblocks, in, out);
117 cccbc_ctx_decl(mode->size, ctx);
119 mode->init(mode, ctx, key_len, key);
124 mode->cbc(ctx, iv_ctx, nblocks, in, out);
125 cccbc_ctx_clear(mode->size, ctx);
145 CC_INLINE void cccfb_init(const struct ccmode_cfb *mode, cccfb_ctx *ctx,
148 mode->init(mode, ctx, key_len, key, iv);
151 CC_INLINE void cccfb_update(const struct ccmode_cfb *mode, cccfb_ctx *ctx,
154 mode->cfb(ctx, in_len, in, out);
161 cccfb_ctx_decl(mode->size, ctx);
162 mode->init(mode, ctx, key_len, key, iv);
163 mode->cfb(ctx, in_len, in, out);
164 cccfb_ctx_clear(mode->size, ctx);
184 CC_INLINE void cccfb8_init(const struct ccmode_cfb8 *mode, cccfb8_ctx *ctx,
187 mode->init(mode, ctx, key_len, key, iv);
190 CC_INLINE void cccfb8_update(const struct ccmode_cfb8 *mode, cccfb8_ctx *ctx,
193 mode->cfb8(ctx, in_len, in, out);
200 cccfb8_ctx_decl(mode->size, ctx);
201 mode->init(mode, ctx, key_len, key, iv);
202 mode->cfb8(ctx, in_len, in, out);
203 cccfb8_ctx_clear(mode->size, ctx);
227 CC_INLINE void ccctr_init(const struct ccmode_ctr *mode, ccctr_ctx *ctx,
230 mode->init(mode, ctx, key_len, key, iv);
233 CC_INLINE void ccctr_update(const struct ccmode_ctr *mode, ccctr_ctx *ctx,
237 mode->ctr(ctx, numBlocks, in, out);
245 ccctr_ctx_decl(mode->size, ctx);
246 mode->init(mode, ctx, key_len, key, iv);
247 mode->ctr(ctx, numBlocks, in, out);
248 ccctr_ctx_clear(mode->size, ctx);
269 CC_INLINE void ccofb_init(const struct ccmode_ofb *mode, ccofb_ctx *ctx,
272 mode->init(mode, ctx, key_len, key, iv);
275 CC_INLINE void ccofb_update(const struct ccmode_ofb *mode, ccofb_ctx *ctx,
278 mode->ofb(ctx, in_len, in, out);
285 ccofb_ctx_decl(mode->size, ctx);
286 mode->init(mode, ctx, key_len, key, iv);
287 mode->ofb(ctx, in_len, in, out);
288 ccofb_ctx_clear(mode->size, ctx);
328 CC_INLINE void ccxts_init(const struct ccmode_xts *mode, ccxts_ctx *ctx,
331 mode->init(mode, ctx, key_len, key, tweak_key);
334 CC_INLINE void ccxts_set_tweak(const struct ccmode_xts *mode, ccxts_ctx *ctx, ccxts_tweak *tweak, const void *iv)
336 mode->set_tweak(ctx, tweak, iv);
339 CC_INLINE void *ccxts_update(const struct ccmode_xts *mode, ccxts_ctx *ctx,
342 return mode->xts(ctx, tweak, in_len, in, out);
350 ccxts_ctx_decl(mode->size, ctx);
352 mode->init(mode, ctx, key_len, key, tweak_key);
353 mode->set_tweak(ctx, tweak, iv);
354 mode->xts(ctx, tweak, in_len, in, out);
355 ccxts_ctx_clear(mode->size, ctx);
376 CC_INLINE void ccgcm_init(const struct ccmode_gcm *mode, ccgcm_ctx *ctx,
379 mode->init(mode, ctx, key_len, key);
382 CC_INLINE void ccgcm_set_iv(const struct ccmode_gcm *mode, ccgcm_ctx *ctx, size_t iv_size, const void *iv)
384 mode->set_iv(ctx, iv_size, iv);
387 CC_INLINE void ccgcm_gmac(const struct ccmode_gcm *mode, ccgcm_ctx *ctx,
390 mode->gmac(ctx, nbytes, in);
393 CC_INLINE void ccgcm_update(const struct ccmode_gcm *mode, ccgcm_ctx *ctx,
396 mode->gcm(ctx, nbytes, in, out);
399 CC_INLINE void ccgcm_finalize(const struct ccmode_gcm *mode, ccgcm_ctx *ctx,
402 mode->finalize(ctx, tag_size, tag);
405 CC_INLINE void ccgcm_reset(const struct ccmode_gcm *mode, ccgcm_ctx *ctx)
407 mode->reset(ctx);
418 ccgcm_ctx_decl(mode->size, ctx);
419 mode->init(mode, ctx, key_len, key);
420 mode->set_iv(ctx, iv_len, iv);
421 mode->gmac(ctx, adata_len, adata);
422 mode->gcm(ctx, nbytes, in, out);
423 mode->finalize(ctx, tag_len, tag);
424 ccgcm_ctx_clear(mode->size, ctx);
445 CC_INLINE void ccomac_init(const struct ccmode_omac *mode, ccomac_ctx *ctx,
448 return mode->init(mode, ctx, tweak_len, key_len, key);
451 CC_INLINE int ccomac_update(const struct ccmode_omac *mode, ccomac_ctx *ctx,
454 return mode->omac(ctx, in_len, tweak, in, out);
461 ccomac_ctx_decl(mode->size, ctx);
462 mode->init(mode, ctx, tweak_len, key_len, key);
463 int result = mode->omac(ctx, in_len, tweak, in, out);
464 ccomac_ctx_clear(mode->size, ctx);