Lines Matching defs:state

82 	struct sha1_state state;
87 err = crypto_shash_export(&dctx->fallback, &state);
91 if (state.count + count > ULONG_MAX)
94 leftover = ((state.count - 1) & (SHA1_BLOCK_SIZE - 1)) + 1;
99 crypto_shash_export(&dctx->fallback, &state);
105 memcpy(state.buffer + leftover, in, count);
106 in = state.buffer;
108 state.count &= ~(SHA1_BLOCK_SIZE - 1);
112 memcpy(result, &state.state, SHA1_DIGEST_SIZE);
116 : "c"((unsigned long)state.count + count), \
117 "a"((unsigned long)state.count), \
143 struct sha256_state state;
148 err = crypto_shash_export(&dctx->fallback, &state);
152 if (state.count + count > ULONG_MAX)
155 leftover = ((state.count - 1) & (SHA256_BLOCK_SIZE - 1)) + 1;
160 crypto_shash_export(&dctx->fallback, &state);
166 memcpy(state.buf + leftover, in, count);
167 in = state.buf;
169 state.count &= ~(SHA1_BLOCK_SIZE - 1);
173 memcpy(result, &state.state, SHA256_DIGEST_SIZE);
177 : "c"((unsigned long)state.count + count), \
178 "a"((unsigned long)state.count), \
274 .state = { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 },
295 memcpy(dst, (u8 *)(sctx->state), SHA1_DIGEST_SIZE);
299 /* Append the bytes in state's buffer to a block to handle */
323 memcpy((u8 *)(sctx->state), dst, SHA1_DIGEST_SIZE);
331 struct sha1_state *state = (struct sha1_state *)shash_desc_ctx(desc);
336 bits = cpu_to_be64(state->count << 3);
339 partial = state->count & 0x3f;
347 padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 5);
357 .state = { SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3, \
379 memcpy(dst, (u8 *)(sctx->state), SHA256_DIGEST_SIZE);
383 /* Append the bytes in state's buffer to a block to handle */
407 memcpy((u8 *)(sctx->state), dst, SHA256_DIGEST_SIZE);
415 struct sha256_state *state =
421 bits = cpu_to_be64(state->count << 3);
424 partial = state->count & 0x3f;
432 padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 8);