1a64l(3) Library Functions Manual a64l(3)
2
3
4
5
6
8 a64l, l64a - convert between long and base-64
9
11 Standard C library (libc, -lc)
12
14 #include <stdlib.h>
15
16 long a64l(const char *str64);
17 char *l64a(long value);
18
19 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
20
21 a64l(), l64a():
22 _XOPEN_SOURCE >= 500
23 || /* glibc >= 2.19: */ _DEFAULT_SOURCE
24 || /* glibc <= 2.19: */ _SVID_SOURCE
25
27 These functions provide a conversion between 32-bit long integers and
28 little-endian base-64 ASCII strings (of length zero to six). If the
29 string used as argument for a64l() has length greater than six, only
30 the first six bytes are used. If the type long has more than 32 bits,
31 then l64a() uses only the low order 32 bits of value, and a64l() sign-
32 extends its 32-bit result.
33
34 The 64 digits in the base-64 system are:
35
36 '.' represents a 0
37 '/' represents a 1
38 0-9 represent 2-11
39 A-Z represent 12-37
40 a-z represent 38-63
41
42 So 123 = 59*64^0 + 1*64^1 = "v/".
43
45 For an explanation of the terms used in this section, see at‐
46 tributes(7).
47
48 ┌────────────────────────────────┬───────────────┬─────────────────────┐
49 │Interface │ Attribute │ Value │
50 ├────────────────────────────────┼───────────────┼─────────────────────┤
51 │l64a() │ Thread safety │ MT-Unsafe race:l64a │
52 ├────────────────────────────────┼───────────────┼─────────────────────┤
53 │a64l() │ Thread safety │ MT-Safe │
54 └────────────────────────────────┴───────────────┴─────────────────────┘
55
57 POSIX.1-2008.
58
60 POSIX.1-2001.
61
63 The value returned by l64a() may be a pointer to a static buffer, pos‐
64 sibly overwritten by later calls.
65
66 The behavior of l64a() is undefined when value is negative. If value
67 is zero, it returns an empty string.
68
69 These functions are broken before glibc 2.2.5 (puts most significant
70 digit first).
71
72 This is not the encoding used by uuencode(1).
73
75 uuencode(1), strtoul(3)
76
77
78
79Linux man-pages 6.04 2023-03-30 a64l(3)