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

NAME

8       base32::core - Expanding basic base32 maps
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require base32::core  ?0.1?
14
15       ::base32::core::define map forwvar backwvar ivar
16
17       ::base32::core::valid string pattern mvar
18
19______________________________________________________________________________
20

DESCRIPTION

22       This  package  provides  generic  commands for the construction of full
23       base32 mappings from a basic mapping listing just the codes and associ‐
24       ated  characters.  The full mappings, regular and inverse, created here
25       map to and from bit sequences, and also handle the partial mappings  at
26       the end of a string.
27
28       This  is in essence an internal package to be used by implementors of a
29       base32 en- and decoder. A regular user has no need of this  package  at
30       all.
31

API

33       ::base32::core::define map forwvar backwvar ivar
34              This  command  computes full forward and backward (inverse) map‐
35              pings from the basic map and stores them in the variables  named
36              by  forwvar  and backwvar resp. It also constructs a regexp pat‐
37              tern for the  detection  of  invalid  characters  in  supposedly
38              base32  encoded  input  and  stores  it in the variable named by
39              ivar.
40
41       ::base32::core::valid string pattern mvar
42              This command checks if  the  input  string  is  a  valid  base32
43              encoded  string,  based  on the pattern of invalid characters as
44              generated by  ::base32::core::define,  and  some  other  general
45              rules.
46
47              The  result  of the command is a boolean flag. Its value is True
48              for a valid string, and False otherwise. In the latter  case  an
49              error  message  describing  the problem with the input is stored
50              into the variable named by mvar. The variable is not touched  if
51              the input was found to be valid.
52
53              The  rules checked by the command, beyond rejection of bad char‐
54              acters, are:
55
56              [1]    The length of the input is not a multiple of eight,
57
58              [2]    The padding appears not at the end of input, but  in  the
59                     middle,
60
61              [3]    The  padding  has  not of length six, four, three, or one
62                     characters,
63

BUGS, IDEAS, FEEDBACK

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

KEYWORDS

80       base32
81

CATEGORY

83       Text processing
84
86       Public domain
87
88
89
90
91tcllib                                0.1                      base32::core(n)
Impressum