Category: | cryptography |
Author/Contact Info | ergowolf |
Description: | creesy ROT13 or caeser encryption. This was one of the first programs I wrote on my own. It does not preserve case. |
my $text; my $type; # This section grabs the text from the user and converts to lower case +. print "Please enter the text you would like to encrypt:"; chomp($text = <STDIN>); $text =~ tr/A-Z/a-z/; # This section lets you pick the type of encryption you would like to +use. print "Please enter c for Caesar or r for ROT13 encryption: "; chomp($type = <STDIN>); $type =~ tr/A-Z/a-z/; # This section uses the encryption you chose. if ($type eq c) { $text =~ tr/c-za-b/a-z/; } if ($type eq r) { $text =~ tr/n-za-m/a-z/; } print $text; |
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Cheesy Encryption
by chromatic (Archbishop) on Apr 27, 2000 at 20:36 UTC | |
by ergowolf (Monk) on Apr 27, 2000 at 23:54 UTC | |
RE: Cheesy Encryption
by Anonymous Monk on Jun 15, 2000 at 23:32 UTC | |
by phenom (Chaplain) on Dec 31, 2003 at 18:41 UTC |
Back to
Code Catacombs