Lines Matching defs:state
81 struct sha1_state state;
86 err = crypto_shash_export(&dctx->fallback, &state);
90 if (state.count + count > ULONG_MAX)
93 leftover = ((state.count - 1) & (SHA1_BLOCK_SIZE - 1)) + 1;
98 crypto_shash_export(&dctx->fallback, &state);
104 memcpy(state.buffer + leftover, in, count);
105 in = state.buffer;
107 state.count &= ~(SHA1_BLOCK_SIZE - 1);
111 memcpy(result, &state.state, SHA1_DIGEST_SIZE);
115 : "c"((unsigned long)state.count + count), \
116 "a"((unsigned long)state.count), \
142 struct sha256_state state;
147 err = crypto_shash_export(&dctx->fallback, &state);
151 if (state.count + count > ULONG_MAX)
154 leftover = ((state.count - 1) & (SHA256_BLOCK_SIZE - 1)) + 1;
159 crypto_shash_export(&dctx->fallback, &state);
165 memcpy(state.buf + leftover, in, count);
166 in = state.buf;
168 state.count &= ~(SHA1_BLOCK_SIZE - 1);
172 memcpy(result, &state.state, SHA256_DIGEST_SIZE);
176 : "c"((unsigned long)state.count + count), \
177 "a"((unsigned long)state.count), \
273 .state = { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 },
294 memcpy(dst, (u8 *)(sctx->state), SHA1_DIGEST_SIZE);
298 /* Append the bytes in state's buffer to a block to handle */
322 memcpy((u8 *)(sctx->state), dst, SHA1_DIGEST_SIZE);
330 struct sha1_state *state = (struct sha1_state *)shash_desc_ctx(desc);
335 bits = cpu_to_be64(state->count << 3);
338 partial = state->count & 0x3f;
346 padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 5);
356 .state = { SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3, \
378 memcpy(dst, (u8 *)(sctx->state), SHA256_DIGEST_SIZE);
382 /* Append the bytes in state's buffer to a block to handle */
406 memcpy((u8 *)(sctx->state), dst, SHA256_DIGEST_SIZE);
414 struct sha256_state *state =
420 bits = cpu_to_be64(state->count << 3);
423 partial = state->count & 0x3f;
431 padlock_output_block((uint32_t *)(state->state), (uint32_t *)out, 8);