encrypt a file then decrypt it use key with Perl
well, computer crashes without any reason sometimes, so we need save some important data into somewhere like Email or one subversion repos. but plain text is not so security, it would be better if we use one "key" to encrypt a file, then use this "key" to decrypt it when we need.
sure, I know winrar or something else can do that. but Perl can do that too. :)
just with Crypt::CBC.
I write a simple script to do this task. that's in http://fayland.googlecode.com/svn/trunk/script/misc/dencrypt.pl
pretty easy but useful for me.
try with:
perl dencrypt.pl encrypt mysecretkey E:/1.txt
then decrypt it use:
perl dencrypt.pl decrypt mysecretkey E:/1.txt.encrypt
That's it, enjoy!
sure, I know winrar or something else can do that. but Perl can do that too. :)
just with Crypt::CBC.
I write a simple script to do this task. that's in http://fayland.googlecode.com/svn/trunk/script/misc/dencrypt.pl
pretty easy but useful for me.
try with:
perl dencrypt.pl encrypt mysecretkey E:/1.txt
then decrypt it use:
perl dencrypt.pl decrypt mysecretkey E:/1.txt.encrypt
That's it, enjoy!
