1A64L(3) Linux Programmer's Manual A64L(3)
2
3
4
6 a64l, l64a - convert between long and base-64
7
9 #include <stdlib.h>
10
11 long a64l(char *str64);
12
13 char *l64a(long value);
14
15
17 These functions provide a conversion between 32-bit long integers and
18 little-endian base-64 ASCII strings (of length zero to six). If the
19 string used as argument for a64l() has length greater than six, only
20 the first six bytes are used. If longs have more than 32 bits, then
21 l64a() uses only the low order 32 bits of value, and a64l() sign-
22 extends its 32-bit result.
23
24 The 64 digits in the base 64 system are:
25 '.' represents a 0
26 '/' represents a 1
27 0-9 represent 2-11
28 A-Z represent 12-37
29 a-z represent 38-63
30 So 123 = 59*64^0 + 1*64^1 = "v/".
31
33 The value returned by a64l() may be a pointer to a static buffer, pos‐
34 sibly overwritten by later calls.
35
36 The behaviour of l64a() is undefined when value is negative. If value
37 is zero, it returns an empty string.
38
39 These functions are broken in glibc before 2.2.5 (puts most significant
40 digit first).
41
42 This is not the encoding used by uuencode(1).
43
45 POSIX.1-2001.
46
48 uuencode(1), itoa(3), strtoul(3)
49
50
51
52 2002-02-15 A64L(3)