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  en‐
43              coded string, based on the pattern of invalid characters as gen‐
44              erated by ::base32::core::define, and some other general rules.
45
46              The result of the command is a boolean flag. Its value  is  True
47              for  a  valid string, and False otherwise. In the latter case an
48              error message describing the problem with the  input  is  stored
49              into  the variable named by mvar. The variable is not touched if
50              the input was found to be valid.
51
52              The rules checked by the command, beyond rejection of bad  char‐
53              acters, are:
54
55              [1]    The length of the input is not a multiple of eight,
56
57              [2]    The  padding  appears not at the end of input, but in the
58                     middle,
59
60              [3]    The padding has not of length six, four,  three,  or  one
61                     characters,
62

BUGS, IDEAS, FEEDBACK

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

KEYWORDS

79       base32
80

CATEGORY

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