Lines Matching refs:ctx
31 struct __sha256_ctx ctx = *ctx0; in __crypto_sha256_export() local
35 partial = ctx.bytecount % SHA256_BLOCK_SIZE; in __crypto_sha256_export()
36 ctx.bytecount -= partial; in __crypto_sha256_export()
37 memcpy(p, &ctx, sizeof(ctx)); in __crypto_sha256_export()
38 p += sizeof(ctx); in __crypto_sha256_export()
43 static int __crypto_sha256_import(struct __sha256_ctx *ctx, const void *in) in __crypto_sha256_import() argument
47 memcpy(ctx, p, sizeof(*ctx)); in __crypto_sha256_import()
48 p += sizeof(*ctx); in __crypto_sha256_import()
49 ctx->bytecount += *p; in __crypto_sha256_import()
93 return __crypto_sha256_export(&SHA224_CTX(desc)->ctx, out); in crypto_sha224_export()
98 return __crypto_sha256_import(&SHA224_CTX(desc)->ctx, in); in crypto_sha224_import()
141 return __crypto_sha256_export(&SHA256_CTX(desc)->ctx, out); in crypto_sha256_export()
146 return __crypto_sha256_import(&SHA256_CTX(desc)->ctx, in); in crypto_sha256_import()
190 return __crypto_sha256_export(&HMAC_SHA224_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha224_export()
195 struct hmac_sha224_ctx *ctx = HMAC_SHA224_CTX(desc); in crypto_hmac_sha224_import() local
197 ctx->ctx.ostate = HMAC_SHA224_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha224_import()
198 return __crypto_sha256_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha224_import()
242 return __crypto_sha256_export(&HMAC_SHA256_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha256_export()
247 struct hmac_sha256_ctx *ctx = HMAC_SHA256_CTX(desc); in crypto_hmac_sha256_import() local
249 ctx->ctx.ostate = HMAC_SHA256_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha256_import()
250 return __crypto_sha256_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha256_import()