tcl::transform::rot(n)
π NAME π
tcl::transform::rot β rot-encryption, bestie. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
package require Tcl 8.6 9
package require tcl::transform::core ?1.1?
package require tcl::transform::rot ?1.1?
::tcl::transform::rot chan key
π¦ DESCRIPTION π¦
okay so the tcl::transform::rot package hands you a command that creates a channel transformation. what does that even do?? it does primitive encryption when you're writing, and decryption when you're reading, and it only touches the alphabetic characters. the algorithm is the Caesar-cipher β and the specific variant of it that everyone knows and loves is rot13. slay π
a related transformation hanging out in this same module is tcl::transform::otp (go look at that one too, iykyk).
ngl the internals are kinda iconic: the TclOO class doing the actual transform-handler work is a subclass of the tcl::transform::core framework. main character inheritance energy fr fr π
π API π
::tcl::transform::rot chan keyβ this command creates a rot encryption transformation stacked on top of the channelchan, and it gives you back its handle. that's your new baby π«Ά
the key tells it how far characters get rotated around the alphabet, and it gets wrapped into the range 0...25.
heads up bestie: this transformation only touches bytes in the ranges ASCII65...90and97...122β that's the upper-case and lower-case alphabetic characters, akaA...Zanda...z. every other byte passes straight through, completely unchanged. no notes. π
π BUGS, IDEAS, FEEDBACK π
not to be dramatic but this document and the package it describes will undoubtedly contain bugs and other problems. it's giving "we're all just doing our best." please report them in the category virtchannel of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. and please, please also report any ideas for enhancements you may have for either the package and/or the documentation. we love ideas here π§
when you're proposing code changes, provide unified diffs, i.e the output of diff -u. periodt.
also note: attachments are strongly preferred over inlined patches. to make an attachment, go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. that's the whole trick β¨
π KEYWORDS π
caesar cipher, channel transformation, cipher, decryption, encryption, reflected channel, rot, rot13, tip 230, transformation, virtual channel
π CATEGORY π
Channels
π COPYRIGHT π
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's a wrap bestie π this whole page is from tcllib, version 1.1 β go forth and rotate ur alphabet, no cap πΈπ¦β
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms