Lines Matching refs:bin_len
114 int b64_len, bin_len;
117 bin_len = (b64_len + 3) / 4 * 3;
118 bin = calloc(bin_len, 1);
122 bin_len = b64_pton(b64, bin, bin_len);
123 if (bin_len < 0) {
129 *bin_lenp = bin_len;
142 size_t bin_off, bin_len;
161 bin_len = hex_len / 2 + hex_len % 2;
162 bin = calloc(bin_len, 1);
166 bin_off = bin_len - 1;
176 assert(bin_off < bin_len);
188 *bin_lenp = bin_len;
194 chap_bin2hex(const char *bin, size_t bin_len)
199 b64_len = (bin_len + 2) / 3 * 4 + 3; /* +2 for "0b", +1 for '\0'. */
206 b64_ntop(bin, bin_len, tmp, b64_len - 2);
212 chap_bin2hex(const char *bin, size_t bin_len)
218 hex_len = bin_len * 2 + 3; /* +2 for "0x", +1 for '\0'. */
225 for (i = 0; i < bin_len; i++) {