3 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
5 .\" SPDX-License-Identifier: GPL-1.0-or-later
7 .\" Corrected, aeb, 2002-05-30
9 .TH a64l 3 (date) "Linux man-pages (unreleased)"
11 a64l, l64a \- convert between long and base-64
14 .RI ( libc ", " \-lc )
17 .B #include <stdlib.h>
19 .BI "long a64l(const char *" str64 );
20 .BI "char *l64a(long " value );
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
32 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
33 || /* glibc >= 2.19: */ _DEFAULT_SOURCE
34 || /* glibc <= 2.19: */ _SVID_SOURCE
37 These functions provide a conversion between 32-bit long integers
38 and little-endian base-64 ASCII strings (of length zero to six).
39 If the string used as argument for
41 has length greater than six, only the first six bytes are used.
44 has more than 32 bits, then
46 uses only the low order 32 bits of
50 sign-extends its 32-bit result.
52 The 64 digits in the base-64 system are:
56 \&\[aq].\[aq] represents a 0
57 \&\[aq]/\[aq] represents a 1
64 So 123 = 59*64\[ha]0 + 1*64\[ha]1 = "v/".
66 For an explanation of the terms used in this section, see
72 Interface Attribute Value
77 T} Thread safety MT-Unsafe race:l64a
82 T} Thread safety MT-Safe
91 may be a pointer to a static buffer, possibly overwritten
101 is zero, it returns an empty string.
103 These functions are broken before glibc 2.2.5
104 (puts most significant digit first).
106 This is not the encoding used by