1A64L(3)                    Linux Programmer's Manual                   A64L(3)
2
3
4
5
6

NAME

8       a64l, l64a - convert between long and base-64
9

SYNOPSIS

11       #include <stdlib.h>
12
13       long a64l(const char *str64);
14       char *l64a(long value);
15
16   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18       a64l(), l64a():
19           _XOPEN_SOURCE >= 500
20               || /* Glibc since 2.19: */ _DEFAULT_SOURCE
21               || /* Glibc <= 2.19: */ _SVID_SOURCE
22

DESCRIPTION

24       These  functions  provide a conversion between 32-bit long integers and
25       little-endian base-64 ASCII strings (of length zero to  six).   If  the
26       string  used  as  argument for a64l() has length greater than six, only
27       the first six bytes are used.  If the type long has more than 32  bits,
28       then  l64a() uses only the low order 32 bits of value, and a64l() sign-
29       extends its 32-bit result.
30
31       The 64 digits in the base-64 system are:
32
33              '.'  represents a 0
34              '/'  represents a 1
35              0-9  represent  2-11
36              A-Z  represent 12-37
37              a-z  represent 38-63
38
39       So 123 = 59*64^0 + 1*64^1 = "v/".
40

ATTRIBUTES

42       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
43       tributes(7).
44
45       ┌────────────────────────────────┬───────────────┬─────────────────────┐
46Interface                       Attribute     Value               
47       ├────────────────────────────────┼───────────────┼─────────────────────┤
48l64a()                          │ Thread safety │ MT-Unsafe race:l64a │
49       ├────────────────────────────────┼───────────────┼─────────────────────┤
50a64l()                          │ Thread safety │ MT-Safe             │
51       └────────────────────────────────┴───────────────┴─────────────────────┘
52

CONFORMING TO

54       POSIX.1-2001, POSIX.1-2008.
55

NOTES

57       The  value returned by l64a() may be a pointer to a static buffer, pos‐
58       sibly overwritten by later calls.
59
60       The behavior of l64a() is undefined when value is negative.   If  value
61       is zero, it returns an empty string.
62
63       These functions are broken in glibc before 2.2.5 (puts most significant
64       digit first).
65
66       This is not the encoding used by uuencode(1).
67

SEE ALSO

69       uuencode(1), strtoul(3)
70

COLOPHON

72       This page is part of release 5.12 of the Linux  man-pages  project.   A
73       description  of  the project, information about reporting bugs, and the
74       latest    version    of    this    page,    can     be     found     at
75       https://www.kernel.org/doc/man-pages/.
76
77
78
79                                  2021-03-22                           A64L(3)
Impressum