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

NAME

8       base32::hex - base32 extended hex encoding
9

SYNOPSIS

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

DESCRIPTION

24       This  package  provides  commands  for encoding and decoding of strings
25       into and out of the extended hex base32 encoding as  specified  in  the
26       RFC 3548bis draft.
27

API

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

Code map

58       The  code  map used to convert 5-bit sequences is shown below, with the
59       numeric id of the bit sequences to the left and the character  used  to
60       encode  it to the right. The important feature of the extended hex map‐
61       ping is that the first 16 codes map to the digits and hex characters.
62
63            0 0    9 9        18 I   27 R
64            1 1   10 A        19 J   28 S
65            2 2   11 B        20 K   29 T
66            3 3   12 C        21 L   30 U
67            4 4   13 D        22 M   31 V
68            5 5   14 E        23 N
69            6 6   15 F        24 O
70            7 7        16 G   25 P
71            8 8        17 H   26 Q
72
73

KEYWORDS

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