perl encrypt/decrypt

Questions about programming languages and debugging
Post Reply
User avatar
hiper
On the way to fame!
On the way to fame!
Posts: 49
Joined: 19 Jan 2009, 17:00
15
Location: in front of my comp
Contact:

perl encrypt/decrypt

Post by hiper »

hi i have just stared with perl, but now iam stuck on a simpel projeckt
i have wrote a "encrypter"....

#!/usr/bin/perl -w -i.bak
while (<>){
s/([qwrtpsdfghjklzxcvbnm])/$1o\l$1/gi;
print;
}

but i don't realy know howto write the decrypter,
any tip/howto's/link's etc... thanks in advance :wink:

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, my Perl is a little rusty, correct me if I am wrong: you use pattern recognition to replace those patterns in the strings and so encrypt the strings....which is actually the Caesar cipher encryption method, right? :-k

so if I am right this should help you a little: http://midnightresearch.com/wiki/index. ... sar_Cipher

User avatar
hiper
On the way to fame!
On the way to fame!
Posts: 49
Joined: 19 Jan 2009, 17:00
15
Location: in front of my comp
Contact:

Post by hiper »

thank you for the quick answer realy helped my :D

Post Reply