Lines Matching full:struct

13 struct shake_ctx {
14 struct crypto_hash_ctx ctx;
15 struct sha3_state sha3;
18 static struct shake_ctx *to_shake_ctx(struct crypto_hash_ctx *ctx) in to_shake_ctx()
20 return container_of(ctx, struct shake_ctx, ctx); in to_shake_ctx()
23 static TEE_Result do_shake_init(struct crypto_hash_ctx *ctx, unsigned int num) in do_shake_init()
25 struct shake_ctx *c = to_shake_ctx(ctx); in do_shake_init()
33 static TEE_Result do_sha3_update(struct crypto_hash_ctx *ctx, in do_sha3_update()
36 struct shake_ctx *c = to_shake_ctx(ctx); in do_sha3_update()
44 static TEE_Result do_shake_final(struct crypto_hash_ctx *ctx, in do_shake_final()
47 struct shake_ctx *c = to_shake_ctx(ctx); in do_shake_final()
55 static TEE_Result do_shake_alloc_ctx(struct crypto_hash_ctx **ctx_ret, in do_shake_alloc_ctx()
56 const struct crypto_hash_ops *ops) in do_shake_alloc_ctx()
58 struct shake_ctx *ctx = calloc(1, sizeof(*ctx)); in do_shake_alloc_ctx()
69 static void do_sha3_free_ctx(struct crypto_hash_ctx *ctx) in do_sha3_free_ctx()
71 struct shake_ctx *c = to_shake_ctx(ctx); in do_sha3_free_ctx()
75 static void do_sha3_copy_state(struct crypto_hash_ctx *dst_ctx, in do_sha3_copy_state()
76 struct crypto_hash_ctx *src_ctx) in do_sha3_copy_state()
78 struct shake_ctx *dc = to_shake_ctx(dst_ctx); in do_sha3_copy_state()
79 struct shake_ctx *sc = to_shake_ctx(src_ctx); in do_sha3_copy_state()
86 static TEE_Result do_shake128_init(struct crypto_hash_ctx *ctx) in do_shake128_init()
91 static const struct crypto_hash_ops shake128_ops = {
99 TEE_Result crypto_shake128_alloc_ctx(struct crypto_hash_ctx **ctx) in crypto_shake128_alloc_ctx()
106 static TEE_Result do_shake256_init(struct crypto_hash_ctx *ctx) in do_shake256_init()
111 static const struct crypto_hash_ops shake256_ops = {
119 TEE_Result crypto_shake256_alloc_ctx(struct crypto_hash_ctx **ctx) in crypto_shake256_alloc_ctx()