Home | History | Annotate | Download | only in crc

Lines Matching refs:sctx

149 void fio_sha512_init(struct fio_sha512_ctx *sctx)
151 sctx->state[0] = H0;
152 sctx->state[1] = H1;
153 sctx->state[2] = H2;
154 sctx->state[3] = H3;
155 sctx->state[4] = H4;
156 sctx->state[5] = H5;
157 sctx->state[6] = H6;
158 sctx->state[7] = H7;
159 sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0;
162 void fio_sha512_update(struct fio_sha512_ctx *sctx, const uint8_t *data,
168 idx = (unsigned int)((sctx->count[0] >> 3) & 0x7F);
171 if ((sctx->count[0] += (len << 3)) < (len << 3)) {
172 if ((sctx->count[1] += 1) < 1)
173 if ((sctx->count[2] += 1) < 1)
174 sctx->count[3]++;
175 sctx->count[1] += (len >> 29);
182 memcpy(&sctx->buf[idx], data, part_len);
183 sha512_transform(sctx->state, sctx->W, sctx->buf);
186 sha512_transform(sctx->state, sctx->W, &data[i]);
194 memcpy(&sctx->buf[idx], &data[i], len - i);
197 memset(sctx->W, 0, sizeof(sctx->W));