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 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17 a64l(), l64a():
18 _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
19 _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
20
22 These functions provide a conversion between 32-bit long integers and
23 little-endian base-64 ASCII strings (of length zero to six). If the
24 string used as argument for a64l() has length greater than six, only
25 the first six bytes are used. If the type long has more than 32 bits,
26 then l64a() uses only the low order 32 bits of value, and a64l() sign-
27 extends its 32-bit result.
28
29 The 64 digits in the base-64 system are:
30
31 '.' represents a 0
32 '/' represents a 1
33 0-9 represent 2-11
34 A-Z represent 12-37
35 a-z represent 38-63
36
37 So 123 = 59*64^0 + 1*64^1 = "v/".
38
40 Multithreading (see pthreads(7))
41 The l64a() function is not thread-safe.
42
43 The a64l() function is thread-safe.
44
46 POSIX.1-2001.
47
49 The value returned by l64a() may be a pointer to a static buffer, pos‐
50 sibly overwritten by later calls.
51
52 The behavior of l64a() is undefined when value is negative. If value
53 is zero, it returns an empty string.
54
55 These functions are broken in glibc before 2.2.5 (puts most significant
56 digit first).
57
58 This is not the encoding used by uuencode(1).
59
61 uuencode(1), strtoul(3)
62
64 This page is part of release 3.53 of the Linux man-pages project. A
65 description of the project, and information about reporting bugs, can
66 be found at http://www.kernel.org/doc/man-pages/.
67
68
69
70 2013-06-21 A64L(3)