Lines Matching refs:state
21 static inline void blake2b_set_lastblock(struct blake2b_state *state) in blake2b_set_lastblock() argument
23 state->f[0] = -1; in blake2b_set_lastblock()
24 state->f[1] = 0; in blake2b_set_lastblock()
27 static inline void blake2b_set_nonlast(struct blake2b_state *state) in blake2b_set_nonlast() argument
29 state->f[0] = 0; in blake2b_set_nonlast()
30 state->f[1] = 0; in blake2b_set_nonlast()
33 typedef void (*blake2b_compress_t)(struct blake2b_state *state,
63 struct blake2b_state *state = shash_desc_ctx(desc); in crypto_blake2b_init() local
66 __blake2b_init(state, outlen, tctx->keylen); in crypto_blake2b_init()
75 struct blake2b_state *state = shash_desc_ctx(desc); in crypto_blake2b_update_bo() local
77 blake2b_set_nonlast(state); in crypto_blake2b_update_bo()
78 compress(state, in, inlen / BLAKE2B_BLOCK_SIZE, BLAKE2B_BLOCK_SIZE); in crypto_blake2b_update_bo()
86 struct blake2b_state *state = shash_desc_ctx(desc); in crypto_blake2b_finup() local
92 blake2b_set_lastblock(state); in crypto_blake2b_finup()
93 compress(state, buf, 1, inlen); in crypto_blake2b_finup()
94 for (i = 0; i < ARRAY_SIZE(state->h); i++) in crypto_blake2b_finup()
95 __cpu_to_le64s(&state->h[i]); in crypto_blake2b_finup()
96 memcpy(out, state->h, crypto_shash_digestsize(desc->tfm)); in crypto_blake2b_finup()