int skein_update(struct skein_ctx *ctx, const u8 *msg, size_t msg_byte_cnt) { int ret = SKEIN_FAIL; skein_assert_ret(ctx, SKEIN_FAIL); switch (ctx->skein_size) { case SKEIN_256: ret = skein_256_update(&ctx->m.s256, msg, msg_byte_cnt); break; case SKEIN_512: ret = skein_512_update(&ctx->m.s512, msg, msg_byte_cnt); break; case SKEIN_1024: ret = skein_1024_update(&ctx->m.s1024, msg, msg_byte_cnt); break; } return ret; }
static int skein1024_update(struct shash_desc *desc, const u8 *data, unsigned int len) { return skein_1024_update((struct skein_1024_ctx *)shash_desc_ctx(desc), data, len); }