2 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .\" Corrected, aeb, 2002-05-30
8 .TH A64L 3 2021-03-22 "" "Linux Programmer's Manual"
10 a64l, l64a \- convert between long and base-64
13 .RI ( libc ", " \-lc )
16 .B #include <stdlib.h>
18 .BI "long a64l(const char *" str64 );
19 .BI "char *l64a(long " value );
23 Feature Test Macro Requirements for glibc (see
24 .BR feature_test_macros (7)):
31 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
32 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
33 || /* Glibc <= 2.19: */ _SVID_SOURCE
36 These functions provide a conversion between 32-bit long integers
37 and little-endian base-64 ASCII strings (of length zero to six).
38 If the string used as argument for
40 has length greater than six, only the first six bytes are used.
43 has more than 32 bits, then
45 uses only the low order 32 bits of
49 sign-extends its 32-bit result.
51 The 64 digits in the base-64 system are:
55 \&\(aq.\(aq represents a 0
56 \&\(aq/\(aq represents a 1
63 So 123 = 59*64\(ha0 + 1*64\(ha1 = "v/".
65 For an explanation of the terms used in this section, see
73 Interface Attribute Value
76 T} Thread safety MT-Unsafe race:l64a
79 T} Thread safety MT-Safe
85 POSIX.1-2001, POSIX.1-2008.
89 may be a pointer to a static buffer, possibly overwritten
99 is zero, it returns an empty string.
101 These functions are broken in glibc before 2.2.5
102 (puts most significant digit first).
104 This is not the encoding used by