Lines Matching full:cc
29 br_md5sha1_init(br_md5sha1_context *cc) in br_md5sha1_init() argument
31 cc->vtable = &br_md5sha1_vtable; in br_md5sha1_init()
32 memcpy(cc->val_md5, br_md5_IV, sizeof cc->val_md5); in br_md5sha1_init()
33 memcpy(cc->val_sha1, br_sha1_IV, sizeof cc->val_sha1); in br_md5sha1_init()
34 cc->count = 0; in br_md5sha1_init()
39 br_md5sha1_update(br_md5sha1_context *cc, const void *data, size_t len) in br_md5sha1_update() argument
45 ptr = (size_t)cc->count & 63; in br_md5sha1_update()
53 memcpy(cc->buf + ptr, buf, clen); in br_md5sha1_update()
57 cc->count += (uint64_t)clen; in br_md5sha1_update()
59 br_md5_round(cc->buf, cc->val_md5); in br_md5sha1_update()
60 br_sha1_round(cc->buf, cc->val_sha1); in br_md5sha1_update()
68 br_md5sha1_out(const br_md5sha1_context *cc, void *dst) in br_md5sha1_out() argument
77 count = cc->count; in br_md5sha1_out()
79 memcpy(buf, cc->buf, ptr); in br_md5sha1_out()
80 memcpy(val_md5, cc->val_md5, sizeof val_md5); in br_md5sha1_out()
81 memcpy(val_sha1, cc->val_sha1, sizeof val_sha1); in br_md5sha1_out()
103 br_md5sha1_state(const br_md5sha1_context *cc, void *dst) in br_md5sha1_state() argument
108 br_range_enc32le(out, cc->val_md5, 4); in br_md5sha1_state()
109 br_range_enc32be(out + 16, cc->val_sha1, 5); in br_md5sha1_state()
110 return cc->count; in br_md5sha1_state()
115 br_md5sha1_set_state(br_md5sha1_context *cc, const void *stb, uint64_t count) in br_md5sha1_set_state() argument
120 br_range_dec32le(cc->val_md5, 4, buf); in br_md5sha1_set_state()
121 br_range_dec32be(cc->val_sha1, 5, buf + 16); in br_md5sha1_set_state()
122 cc->count = count; in br_md5sha1_set_state()