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            0 A    9 J   18 S   27 3
64            1 B   10 K   19 T   28 4
65            2 C   11 L   20 U   29 5
66            3 D   12 M   21 V   30 6
67            4 E   13 N   22 W   31 7
68            5 F   14 O   23 X
69            6 G   15 P   24 Y
70            7 H   16 Q   25 Z
71            8 I   17 R   26 2
72
73

BUGS, IDEAS, FEEDBACK

75       This document, and the package it describes, will  undoubtedly  contain
76       bugs  and other problems.  Please report such in the category base32 of
77       the         Tcllib         SF         Trackers          [http://source
78       forge.net/tracker/?group_id=12883].   Please  also report any ideas for
79       enhancements you may have for either package and/or documentation.
80

KEYWORDS

82       base32, rfc3548
83
85       Copyright (c) Public domain
86
87
88
89
90base32                                0.1                            base32(n)
Impressum