3 dec64, enc64, dec32, enc32, dec16, enc16, encodefmt \- encoding byte arrays as strings
10 int dec64(uchar *out, int lim, char *in, int n)
13 int enc64(char *out, int lim, uchar *in, int n)
16 int dec32(uchar *out, int lim, char *in, int n)
19 int enc32(char *out, int lim, uchar *in, int n)
22 int dec16(uchar *out, int lim, char *in, int n)
25 int enc16(char *out, int lim, uchar *in, int n)
35 create null terminated strings. They return the size of the
36 encoded string (without the null) or -1 if the encoding fails.
39 the length of the output buffer, is too small.
45 return the number of bytes decoded or -1 if the decoding fails.
46 The decoding fails if the output buffer is not large enough or,
47 for base 32, if the input buffer length is not a multiple
55 to print encoded representations of byte arrays.
59 base 16 (i.e. hexadecimal). The default encoding is
62 flag forces lower case.
68 base 64 (same as MIME)
71 The length of the array is specified as
73 For example, to display a 15 byte array as hex:
78 fmtinstall('H', encodefmt);
79 print("%.*H\\n", sizeof x, x);
83 .B /usr/local/plan9/src/libc/port/u32.c
85 .B /usr/local/plan9/src/libc/port/u64.c