{the_cipher the_key} {set ret {}; set thecharacter {}; set thesecret {}; foreach thecharacter $the_cipher thesecret [split $the_key {}] {lappend ret [format "%c" [expr $thecharacter ^ [scan $thesecret %c]]]};join $ret ""}