Lines Matching +full:output +full:- +full:charge +full:- +full:current

4  * Permission is hereby granted, free of charge, to any person obtaining 
30 return (unsigned)(dig->desc >> BR_HASHDESC_OUT_OFF) in hash_size()
39 ls = (unsigned)(dig->desc >> BR_HASHDESC_LBLEN_OFF) in block_size()
56 * block limit, we get the current hash function state: this is in br_hmac_outCT()
57 * a potential output, since we handle MD padding ourselves. in br_hmac_outCT()
59 * be 1 for big-endian, 0 for little-endian in br_hmac_outCT()
62 * hlen hash output size in br_hmac_outCT()
75 * Copy the current hash context. in br_hmac_outCT()
77 hc = ctx->dig; in br_hmac_outCT()
80 * Get function-specific information. in br_hmac_outCT()
83 be = (dig->desc & BR_HASHDESC_MD_PADDING_BE) != 0; in br_hmac_outCT()
85 if (dig->desc & BR_HASHDESC_MD_PADDING_128) { in br_hmac_outCT()
92 * Get current input length and compute total bit length. in br_hmac_outCT()
94 count = dig->state(&hc.vtable, tmp1); in br_hmac_outCT()
102 ncount = (count + (uint64_t)min_len) & ~(uint64_t)(bs - 1); in br_hmac_outCT()
106 zlen = (size_t)(ncount - count); in br_hmac_outCT()
107 dig->update(&hc.vtable, data, zlen); in br_hmac_outCT()
109 len -= zlen; in br_hmac_outCT()
110 max_len -= zlen; in br_hmac_outCT()
116 * -- 'count' contains the number of bytes already processed in br_hmac_outCT()
118 * -- We must input 'len' bytes. 'min_len' is unimportant: we in br_hmac_outCT()
123 * kr number of input bytes already in the current block in br_hmac_outCT()
129 * km, kz and kl are counted from the current offset in the in br_hmac_outCT()
132 kr = (uint32_t)count & (bs - 1); in br_hmac_outCT()
133 kz = ((kr + (uint32_t)len + po + bs - 1) & ~(bs - 1)) - 1 - kr; in br_hmac_outCT()
134 kl = kz - 7; in br_hmac_outCT()
135 km = ((kr + (uint32_t)max_len + po + bs - 1) & ~(bs - 1)) - kr; in br_hmac_outCT()
138 * We must now process km bytes. For index u from 0 to km-1: in br_hmac_outCT()
141 * The tests for d and e need not be constant-time, since in br_hmac_outCT()
160 v = (kr + u) & (bs - 1); in br_hmac_outCT()
161 if (v >= (bs - 8)) { in br_hmac_outCT()
164 j = (v - (bs - 8)) << 3; in br_hmac_outCT()
166 e = (uint32_t)(bit_len >> (56 - j)); in br_hmac_outCT()
177 dig->update(&hc.vtable, x, 1); in br_hmac_outCT()
178 if (v == (bs - 1)) { in br_hmac_outCT()
179 dig->state(&hc.vtable, tmp1); in br_hmac_outCT()
185 * Inner hash output is in tmp2[]; we finish processing. in br_hmac_outCT()
187 dig->init(&hc.vtable); in br_hmac_outCT()
188 dig->set_state(&hc.vtable, ctx->kso, (uint64_t)bs); in br_hmac_outCT()
189 dig->update(&hc.vtable, tmp2, hlen); in br_hmac_outCT()
190 dig->out(&hc.vtable, tmp2); in br_hmac_outCT()
191 memcpy(out, tmp2, ctx->out_len); in br_hmac_outCT()
192 return ctx->out_len; in br_hmac_outCT()