1[comment {-*- tcl -*- doctools manpage}]
2[manpage_begin base32::core n 0.1]
3[copyright {Public domain}]
4[moddesc   {Base32 encoding}]
5[titledesc {Expanding basic base32 maps}]
6[category  {Text processing}]
7[require Tcl 8.4]
8[require base32::core [opt 0.1]]
9[description]
10[keywords base32]
11[para]
12
13This package provides generic commands for the construction of full
14base32 mappings from a basic mapping listing just the codes and
15associated characters. The full mappings, regular and inverse, created
16here map to and from bit sequences, and also handle the partial
17mappings at the end of a string.
18
19[para]
20
21This is in essence an internal package to be used by implementors of a
22base32 en- and decoder. A regular user has no need of this package at
23all.
24
25
26[section API]
27
28[list_begin definitions]
29
30[call [cmd ::base32::core::define] [arg map] [arg forwvar] [arg backwvar] [arg ivar]]
31
32This command computes full forward and backward (inverse) mappings
33from the basic [arg map] and stores them in the variables named by
34[arg forwvar] and [arg backwvar] resp. It also constructs a regexp
35pattern for the detection of invalid characters in supposedly base32
36encoded input and stores it in the variable named by [arg ivar].
37
38
39[call [cmd ::base32::core::valid] [arg string] [arg pattern] [arg mvar]]
40
41This command checks if the input [arg string] is a valid base32
42encoded string, based on the [arg pattern] of invalid characters as
43generated by [cmd ::base32::core::define], and some other general
44rules.
45
46[para]
47
48The result of the command is a boolean flag. Its value is [const True]
49for a valid [arg string], and [const False] otherwise. In the latter
50case an error message describing the problem with the input is stored
51into the variable named by [arg mvar]. The variable is not touched if
52the input was found to be valid.
53
54[para]
55
56The rules checked by the command, beyond rejection of bad characters,
57are:
58
59[list_begin enumerated]
60[enum] The length of the input is not a multiple of eight,
61[enum] The padding appears not at the end of input, but in the middle,
62[enum] The padding has not of length six, four, three, or one characters,
63[list_end]
64[list_end]
65
66[section {BUGS, IDEAS, FEEDBACK}]
67
68This document, and the package it describes, will undoubtedly contain
69bugs and other problems.
70
71Please report such in the category [emph base32] of the
72[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].
73
74Please also report any ideas for enhancements you may have for either
75package and/or documentation.
76
77
78[manpage_end]
79