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

KEYWORDS

75       base32, rfc3548
76
78       Copyright (c) Public domain
79
80
81
82
83base32                                0.1                            base32(n)
Impressum