Lines Matching refs:state
83 (*a)->state = pointer + sizeof(auth_t);
98 /* zeroize entire state*/
112 hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len) {
129 state->opad[i] = key[i] ^ 0x5c;
134 ((uint8_t *)state->opad)[i] = 0x5c;
140 sha1_init(&state->init_ctx);
143 sha1_update(&state->init_ctx, ipad, 64);
144 memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t));
150 hmac_start(hmac_ctx_t *state) {
152 memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t));
158 hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets) {
164 sha1_update(&state->ctx, message, msg_octets);
170 hmac_compute(hmac_ctx_t *state, const void *message,
181 hmac_update(state, (const uint8_t*)message, msg_octets);
182 sha1_final(&state->ctx, H);
188 debug_print(mod_hmac, "intermediate state: %s",
192 sha1_init(&state->ctx);
195 sha1_update(&state->ctx, (uint8_t *)state->opad, 64);
198 sha1_update(&state->ctx, (uint8_t *)H, 20);
201 sha1_final(&state->ctx, hash_value);