- or download this
#!/usr/bin/env perl -l
...
print "Ciphertext: $input";
print "Plaintext: $plaintext";
}
- or download this
$ pm_caesar_cipher.pl def 1 1 3
Transform: encrypt -- Shift: right -- Positions: 3
Plaintext: def
Ciphertext: ghi
- or download this
$ pm_caesar_cipher.pl ghi 0 1 3
Transform: decrypt -- Shift: right -- Positions: 3
Ciphertext: ghi
Plaintext: def
- or download this
$ pm_caesar_cipher.pl def 1 0 3
Transform: encrypt -- Shift: left -- Positions: 3
Plaintext: def
Ciphertext: abc
- or download this
$ pm_caesar_cipher.pl abc 0 0 3
Transform: decrypt -- Shift: left -- Positions: 3
Ciphertext: abc
Plaintext: def
- or download this
$ pm_caesar_cipher.pl 'The quick brown fox jumped over the lazy dog.'
+1 1 145
Transform: encrypt -- Shift: right -- Positions: 50
Plaintext: The quick brown fox jumped over the lazy dog.
Ciphertext: ';8RDH<6>R5EBJAR9BKR=H@C87RBI8ERG;8R?4MLR7B:`
- or download this
$ pm_caesar_cipher.pl "';8RDH<6>R5EBJAR9BKR=H@C87RBI8ERG;8R?4MLR7B:\`"
+ 0 1 145
Transform: decrypt -- Shift: right -- Positions: 50
Ciphertext: ';8RDH<6>R5EBJAR9BKR=H@C87RBI8ERG;8R?4MLR7B:`
Plaintext: The quick brown fox jumped over the lazy dog.
- or download this
$ pm_caesar_cipher.pl
Usage: ./pm_caesar_cipher.pl text encrypt/decrypt(1|0) right_shift/lef
+t_shift(1|0) positions_to_shift
(Note: when decrypting, '*_shift' and 'positions_to_shift' is what was
+ used for the original encryption!)