Lines Matching refs:ctx
23 struct s390_sha_ctx *ctx = shash_desc_ctx(desc); in s390_sha_update() local
29 index = ctx->count & (bsize - 1); in s390_sha_update()
30 ctx->count += len; in s390_sha_update()
37 memcpy(ctx->buf + index, data, bsize - index); in s390_sha_update()
38 ret = crypt_s390_kimd(ctx->func, ctx->state, ctx->buf, bsize); in s390_sha_update()
48 ret = crypt_s390_kimd(ctx->func, ctx->state, data, in s390_sha_update()
57 memcpy(ctx->buf + index , data, len); in s390_sha_update()
65 struct s390_sha_ctx *ctx = shash_desc_ctx(desc); in s390_sha_final() local
75 index = ctx->count & (bsize - 1); in s390_sha_final()
79 ctx->buf[index] = 0x80; in s390_sha_final()
83 memset(ctx->buf + index, 0x00, end - index - 8); in s390_sha_final()
89 bits = ctx->count * 8; in s390_sha_final()
90 memcpy(ctx->buf + end - 8, &bits, sizeof(bits)); in s390_sha_final()
92 ret = crypt_s390_kimd(ctx->func, ctx->state, ctx->buf, end); in s390_sha_final()
97 memcpy(out, ctx->state, crypto_shash_digestsize(desc->tfm)); in s390_sha_final()
99 memset(ctx, 0, sizeof *ctx); in s390_sha_final()