• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/GeoIP-1.5.1/libGeoIP/

Lines Matching refs:inlen

28  * bool ok = base64_decode_alloc (in, inlen, &out, &outlen);
35 * size_t outlen = base64_encode_alloc (in, inlen, &out);
36 * if (out == NULL && outlen == 0 && inlen != 0)
71 base64_encode (const char *restrict in, size_t inlen,
77 while (inlen && outlen)
83 + (--inlen ? to_uchar (in[1]) >> 4 : 0))
88 (inlen
90 + (--inlen ? to_uchar (in[2]) >> 6 : 0))
95 *out++ = inlen ? b64str[to_uchar (in[2]) & 0x3f] : '=';
98 if (inlen)
99 inlen--;
100 if (inlen)
116 BASE64_LENGTH(inlen) + 1. */
118 base64_encode_alloc (const char *in, size_t inlen, char **out)
120 size_t outlen = 1 + BASE64_LENGTH (inlen);
124 * If there is no overflow, outlen >= inlen.
126 * If the operation (inlen + 2) overflows then it yields at most +1, so
130 * correct value, so the result is < ((inlen + 2) / 3) * 2, which is
131 * less than (inlen + 2) * 0.66667, which is less than inlen as soon as
132 * (inlen > 4).
134 if (inlen > outlen)
144 base64_encode (in, inlen, *out, outlen);
376 decode_4 (char const *restrict in, size_t inlen,
380 if (inlen < 2)
393 if (inlen == 2)
398 if (inlen != 4)
416 if (inlen == 3)
421 if (inlen != 4)
462 const char *restrict in, size_t inlen,
473 flush_ctx = inlen == 0;
487 if (!decode_4 (in, inlen, &out, &outleft))
491 inlen -= 4;
495 if (inlen == 0 && !flush_ctx)
500 if (inlen && *in == '\n' && ignore_newlines)
503 --inlen;
512 char const *in_end = in + inlen;
516 non_nl = get_4 (ctx, &in, in_end, &inlen);
523 if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines))
525 inlen = 0;
528 if (!decode_4 (non_nl, inlen, &out, &outleft))
531 inlen = in_end - in;
537 return inlen == 0;
553 const char *in, size_t inlen, char **out,
558 The exact size is 3 * inlen / 4, minus 1 if the input ends
561 size_t needlen = 3 * (inlen / 4) + 2;
567 if (!base64_decode_ctx (ctx, in, inlen, *out, &needlen))