Lines Matching full:src
25 DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *ds… in duk__base64_encode_helper() argument
36 src_end_fast = src + n_full3; in duk__base64_encode_helper()
37 while (DUK_UNLIKELY(src != src_end_fast)) { in duk__base64_encode_helper()
38 t = (duk_uint_t) (*src++); in duk__base64_encode_helper()
39 t = (t << 8) + (duk_uint_t) (*src++); in duk__base64_encode_helper()
40 t = (t << 8) + (duk_uint_t) (*src++); in duk__base64_encode_helper()
49 dst[0] = duk_base64_enctab[(src[0] >> 2) & 0x3f]; in duk__base64_encode_helper()
50 dst[1] = duk_base64_enctab[((src[0] << 4) & 0x30) | ((src[1] >> 4) & 0x0f)]; in duk__base64_encode_helper()
51 dst[2] = duk_base64_enctab[((src[1] << 2) & 0x3f) | ((src[2] >> 6) & 0x03)]; in duk__base64_encode_helper()
52 dst[3] = duk_base64_enctab[src[2] & 0x3f]; in duk__base64_encode_helper()
53 src += 3; dst += 4; in duk__base64_encode_helper()
61 t = (duk_uint_t) (*src++); in duk__base64_encode_helper()
70 t = (duk_uint_t) (*src++); in duk__base64_encode_helper()
71 t = (t << 8) + (duk_uint_t) (*src++); in duk__base64_encode_helper()
81 DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *ds… in duk__base64_encode_helper() argument
87 src_end = src + srclen; in duk__base64_encode_helper()
89 while (src < src_end) { in duk__base64_encode_helper()
95 if (src >= src_end) { in duk__base64_encode_helper()
98 t += (duk_uint_t) (*src++); in duk__base64_encode_helper()
139 DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8… in duk__base64_decode_helper() argument
147 src_end = src + srclen; in duk__base64_decode_helper()
148 src_end_safe = src_end - 4; /* if 'src < src_end_safe', safe to read 4 bytes */ in duk__base64_decode_helper()
159 while (src <= src_end_safe) { in duk__base64_decode_helper()
165 DUK_DDD(DUK_DDDPRINT("fast loop: src=%p, src_end_safe=%p, src_end=%p", in duk__base64_decode_helper()
166 (const void *) src, (const void *) src_end_safe, (const void *) src_end)); in duk__base64_decode_helper()
168 t = (duk_int_t) duk_base64_dectab[*src++]; in duk__base64_decode_helper()
169 t = (t << 6) | (duk_int_t) duk_base64_dectab[*src++]; in duk__base64_decode_helper()
170 t = (t << 6) | (duk_int_t) duk_base64_dectab[*src++]; in duk__base64_decode_helper()
171 t = (t << 6) | (duk_int_t) duk_base64_dectab[*src++]; in duk__base64_decode_helper()
175 src -= 4; in duk__base64_decode_helper()
192 DUK_DDD(DUK_DDDPRINT("slow loop: src=%p, src_end=%p, n_chars=%ld, n_equal=%ld, t=%ld", in duk__base64_decode_helper()
193 … (const void *) src, (const void *) src_end, (long) n_chars, (long) n_equal, (long) t)); in duk__base64_decode_helper()
195 if (DUK_UNLIKELY(src >= src_end)) { in duk__base64_decode_helper()
199 x = duk_base64_dectab[*src++]; in duk__base64_decode_helper()
254 DUK_DDD(DUK_DDDPRINT("done; src=%p, src_end=%p, n_chars=%ld", in duk__base64_decode_helper()
255 (const void *) src, (const void *) src_end, (long) n_chars)); in duk__base64_decode_helper()
257 DUK_ASSERT(src == src_end); in duk__base64_decode_helper()
274 DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8… in duk__base64_decode_helper() argument
281 src_end = src + srclen; in duk__base64_decode_helper()
286 while (src < src_end) { in duk__base64_decode_helper()
287 x = *src++; in duk__base64_decode_helper()
372 const duk_uint8_t *src; in duk_base64_encode() local
385 src = duk__prep_codec_arg(ctx, index, &srclen); in duk_base64_encode()
386 /* Note: for srclen=0, src may be NULL */ in duk_base64_encode()
399 duk__base64_encode_helper((const duk_uint8_t *) src, srclen, dst); in duk_base64_encode()
412 const duk_uint8_t *src; in duk_base64_decode() local
426 src = duk__prep_codec_arg(ctx, index, &srclen); in duk_base64_decode()
440 retval = duk__base64_decode_helper((const duk_uint8_t *) src, srclen, dst, &dst_final); in duk_base64_decode()