1base32(n)                       Base32 encoding                      base32(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       base32 - base32 standard encoding
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require base32::core  ?0.1?
14
15       package require base32  ?0.1?
16
17       ::base32::encode string
18
19       ::base32::decode estring
20
21______________________________________________________________________________
22

DESCRIPTION

24       This  package  provides  commands  for encoding and decoding of strings
25       into and out of the standard base32 encoding as specified in RFC 3548.
26

API

28       ::base32::encode string
29              This command encodes the given string in base32 and returns  the
30              encoded  string as its result. The result may be padded with the
31              character = to signal a partial encoding at the end of the input
32              string.
33
34       ::base32::decode estring
35              This commands takes the estring and decodes it under the assump‐
36              tion that it is a valid base32 encoded string. The result of the
37              decoding is returned as the result of the command.
38
39              Note that while the encoder will generate only uppercase charac‐
40              ters this decoder accepts input in lowercase as well.
41
42              The command will always throw  an  error  whenever  encountering
43              conditions which signal some type of bogus input, namely if
44
45              [1]    the  input contains characters which are not valid output
46                     of a base32 encoder,
47
48              [2]    the length of the input is not a multiple of eight,
49
50              [3]    padding appears not at the end of input, but in the  mid‐
51                     dle,
52
53              [4]    the  padding  has  not of length six, four, three, or one
54                     characters,
55

CODE MAP

57       The code map used to convert 5-bit sequences is shown below,  with  the
58       numeric  id  of the bit sequences to the left and the character used to
59       encode it to the right. It should be noted that the characters "0"  and
60       "1"  are not used by the encoding. This is done as these characters can
61       be easily confused with "O", "o" and "l" (L).
62
63
64                0 A    9 J   18 S   27 3
65                1 B   10 K   19 T   28 4
66                2 C   11 L   20 U   29 5
67                3 D   12 M   21 V   30 6
68                4 E   13 N   22 W   31 7
69                5 F   14 O   23 X
70                6 G   15 P   24 Y
71                7 H   16 Q   25 Z
72                8 I   17 R   26 2
73
74

BUGS, IDEAS, FEEDBACK

76       This document, and the package it describes, will  undoubtedly  contain
77       bugs  and other problems.  Please report such in the category base32 of
78       the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].   Please
79       also  report any ideas for enhancements you may have for either package
80       and/or documentation.
81
82       When proposing code changes, please provide unified diffs, i.e the out‐
83       put of diff -u.
84
85       Note  further  that  attachments  are  strongly  preferred over inlined
86       patches. Attachments can be made by going  to  the  Edit  form  of  the
87       ticket  immediately  after  its  creation, and then using the left-most
88       button in the secondary navigation bar.
89

KEYWORDS

91       base32, rfc3548
92

CATEGORY

94       Text processing
95
97       Public domain
98
99
100
101
102tcllib                                0.1                            base32(n)
Impressum