Lines Matching defs:cc
203 sha2small_update(br_sha224_context *cc, const void *data, size_t len)
209 ptr = (size_t)cc->count & 63;
210 cc->count += (uint64_t)len;
218 memcpy(cc->buf + ptr, buf, clen);
223 br_sha2small_round(cc->buf, cc->val);
230 sha2small_out(const br_sha224_context *cc, void *dst, int num)
236 ptr = (size_t)cc->count & 63;
237 memcpy(buf, cc->buf, ptr);
238 memcpy(val, cc->val, sizeof val);
247 br_enc64be(buf + 56, cc->count << 3);
254 br_sha224_init(br_sha224_context *cc)
256 cc->vtable = &br_sha224_vtable;
257 memcpy(cc->val, br_sha224_IV, sizeof cc->val);
258 cc->count = 0;
263 br_sha224_update(br_sha224_context *cc, const void *data, size_t len)
265 sha2small_update(cc, data, len);
270 br_sha224_out(const br_sha224_context *cc, void *dst)
272 sha2small_out(cc, dst, 7);
277 br_sha224_state(const br_sha224_context *cc, void *dst)
279 br_range_enc32be(dst, cc->val, 8);
280 return cc->count;
285 br_sha224_set_state(br_sha224_context *cc, const void *stb, uint64_t count)
287 br_range_dec32be(cc->val, 8, stb);
288 cc->count = count;
293 br_sha256_init(br_sha256_context *cc)
295 cc->vtable = &br_sha256_vtable;
296 memcpy(cc->val, br_sha256_IV, sizeof cc->val);
297 cc->count = 0;
302 br_sha256_out(const br_sha256_context *cc, void *dst)
304 sha2small_out(cc, dst, 8);