Home | History | Annotate | Download | only in net

Lines Matching defs:Base64

1 /*	$NetBSD: base64.c,v 1.17 2024/01/20 14:52:48 christos Exp $	*/
48 static const char rcsid[] = "Id: base64.c,v 1.4 2005/04/27 04:56:34 sra Exp";
50 __RCSID("$NetBSD: base64.c,v 1.17 2024/01/20 14:52:48 christos Exp $");
75 static const char Base64[] =
92 of which is translated into a single digit in the base64 alphabet.
98 Table 1: The Base64 Alphabet
126 Since all base64 input is an integral number of octets, only the
171 target[datalength++] = Base64[output[0]];
172 target[datalength++] = Base64[output[1]];
173 target[datalength++] = Base64[output[2]];
174 target[datalength++] = Base64[output[3]];
195 target[datalength++] = Base64[output[0]];
196 target[datalength++] = Base64[output[1]];
200 target[datalength++] = Base64[output[2]];
237 pos = strchr(Base64, ch);
238 if (pos == NULL) /*%< A non-base64 character. */
246 target[tarindex] = (u_char)(pos - Base64) << 2;
255 (uint32_t)(pos - Base64) >> 4;
256 nextbyte = (u_char)((pos - Base64) & 0x0f) << 4;
270 (uint32_t)(pos - Base64) >> 2;
271 nextbyte = (u_char)((pos - Base64) & 0x03) << 6;
284 target[tarindex] |= (u_char)(pos - Base64);