ENCODE(2)ENCODE(2)
NAME
dec64, enc64, dec32, enc32, dec16, enc16, \ dec64chr, enc64chr, dec32chr, enc32chr, dec16chr, enc16chr, \ encodefmt – encoding byte arrays as strings
SYNOPSIS
int dec64(uchar *out, int lim, char *in, int n)
int enc64(char *out, int lim, uchar *in, int n)
int dec32(uchar *out, int lim, char *in, int n)
int enc32(char *out, int lim, uchar *in, int n)
int dec16(uchar *out, int lim, char *in, int n)
int enc16(char *out, int lim, uchar *in, int n)
int dec64chr(int c)
int enc64chr(int o)
int dec32chr(int c)
int enc32chr(int o)
int dec16chr(int c)
int enc16chr(int o)
int encodefmt(Fmt*)
DESCRIPTION
The functions described here handle encoding and decoding of bytes to printable ASCII strings as specified by RFC4648.
base 16 (i.e. hexadecimal). The default encoding is
in upper case. The
base 32. The default is upper case, same as
base 64 (same as MIME)
The length of the array is specified as
char x[15]; fmtinstall('H', encodefmt); print("%.*H\\n", sizeof x, x);
SOURCE
HISTORY
In Jan 2018, base 32 encoding was changed from non-standard to standard RFC4648 alphabet.