For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > June 2007 > Simple Encryption - what function/module could I use?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Simple Encryption - what function/module could I use?
Yitzle

2007-06-20, 7:59 am

What function/module (I prefer built in functions...) is there that I
can use to do some simple/basic reversable (opposed to crypt()'s one
way) encryption?
I want to be able to encrypt/decrypt a textfile.
rcook@pcug.org.au

2007-06-20, 7:59 am

> What function/module (I prefer built in functions...) is there that I
> can use to do some simple/basic reversable (opposed to crypt()'s one
> way) encryption?
> I want to be able to encrypt/decrypt a textfile.


Did you go to http://search.cpan.org/ and search on 'encrypt' ?

There are lots of them, one might suit you


Owen

Oryann9

2007-06-21, 9:58 pm

So you are using the binary ^ to encrypt with XORED
together bit by bit? Please explain?

thank you.


$/etc/skel
$ perl -le 'print "hello" ^ "XXXXX";'
0=447

$ perl encrypt.plx file2
plaintext:
hello

encryptedtext:
0=447R

decryptedtext:
hello


Also noticed I could use binary & and |

$ perl -le 'print "hello" & "XXXXX";'
H@HHH

$ perl -le 'print "hello" | "XXXXX";'
x}||⌂

but these were not decrypted. Why not?



________________________________________
________________________________________
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com...wmail_html.html
Oryann9

2007-06-21, 9:58 pm

ok must of missed it. sorry.



________________________________________
________________________________________
____
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=o...+for+kids&cs=bz
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com