On Sun, 6 Oct 2002 19:28:22 +0100, [EMAIL PROTECTED] (Dan) wrote: >Am after suggestions about which Crypt:: module (or any module at that >matter) would be best to encrypt passwords for storage, and decrypt them >again for using within the script. > >Passwords on my script are generally required to be between 8 & 16 >characters. Any ideas?
I like to use Crypt::RC4 because it's fast, easy, and is a pure perl module which can be used on remote servers from your personal lib. Read the pod , I think you can use a plain ascii key, but the hex key method is slightly more obscure to a casual observer. ############################################################## #!/usr/bin/perl use Crypt::RC4; $passphrase = pack('C*', (0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef)); #$passphrase = "rumpelstiltskin"; $plaintext= qw(qqq"""""""''''''';;;;;qwweeerrrtttyyyy); $encrypted = RC4( $passphrase, $plaintext ); $decrypt = RC4( $passphrase, $encrypted ); print "$plaintext\n$encrypted\n$decrypt\n"; ############################################################## -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]