Lines Matching defs:state
42 static inline void __blake2b_init(struct blake2b_state *state, size_t outlen,
45 state->h[0] = BLAKE2B_IV0 ^ (0x01010000 | keylen << 8 | outlen);
46 state->h[1] = BLAKE2B_IV1;
47 state->h[2] = BLAKE2B_IV2;
48 state->h[3] = BLAKE2B_IV3;
49 state->h[4] = BLAKE2B_IV4;
50 state->h[5] = BLAKE2B_IV5;
51 state->h[6] = BLAKE2B_IV6;
52 state->h[7] = BLAKE2B_IV7;
53 state->t[0] = 0;
54 state->t[1] = 0;
55 state->f[0] = 0;
56 state->f[1] = 0;
57 state->buflen = 0;
58 state->outlen = outlen;
60 memcpy(state->buf, key, keylen);
61 memset(&state->buf[keylen], 0, BLAKE2B_BLOCK_SIZE - keylen);
62 state->buflen = BLAKE2B_BLOCK_SIZE;