1tcl::transform::rot(n) Reflected/virtual channel supporttcl::transform::rot(n)
2
3
4
5______________________________________________________________________________
6
8 tcl::transform::rot - rot-encryption
9
11 package require Tcl 8.6
12
13 package require tcl::transform::core ?1?
14
15 package require tcl::transform::rot ?1?
16
17 ::tcl::transform::rot chan key
18
19______________________________________________________________________________
20
22 The tcl::transform::rot package provides a command creating a channel
23 transformation which performs primitive encryption (on writing) and de‐
24 cryption (on reading) on the alphabetic characters. The algorithm is
25 the Caesar-cipher, a specific variant of which is rot13.
26
27 A related transformations in this module is tcl::transform::otp.
28
29 The internal TclOO class implementing the transform handler is a sub-
30 class of the tcl::transform::core framework.
31
33 ::tcl::transform::rot chan key
34 This command creates a rot encryption transformation on top of
35 the channel chan and returns its handle.
36
37 The "key" specifies how far characters are rotated in the alpha‐
38 bet, and is wrapped to the range "0...25".
39
40 Note that this transformation affects only bytes in the ranges
41 ASCII 65...90, and 97...122, i.e. the upper- and lower-case al‐
42 phabetic characters, i.e. "A...Z" and "a...z". All other bytes
43 are passed through unchanged.
44
46 This document, and the package it describes, will undoubtedly contain
47 bugs and other problems. Please report such in the category virtchan‐
48 nel of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist].
49 Please also report any ideas for enhancements you may have for either
50 package and/or documentation.
51
52 When proposing code changes, please provide unified diffs, i.e the out‐
53 put of diff -u.
54
55 Note further that attachments are strongly preferred over inlined
56 patches. Attachments can be made by going to the Edit form of the
57 ticket immediately after its creation, and then using the left-most
58 button in the secondary navigation bar.
59
61 caesar cipher, channel transformation, cipher, decryption, encryption,
62 reflected channel, rot, rot13, tip 230, transformation, virtual channel
63
65 Channels
66
68 Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
69
70
71
72
73tcllib 1 tcl::transform::rot(n)