LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-26-2014, 04:02 AM   #1
jags1984
Member
 
Registered: Mar 2013
Posts: 83

Rep: Reputation: Disabled
Encrypt and Decryption of a file in perl.


Hi,

How to encrpt and decrpt a file in perl.

Currently I am using Unix method of encryption and decryption in Perl program. I want to do it in Perl way.

Code:
Encryption
my $ret= `openssl enc -aes-256-cbc -salt -in $In_File -out $Out_File -k "Jack and Jill" `;
Code:
Decryption
my $ret= `openssl enc -aes-256-cbc -d -in $In_File -out $Out_File -k "Jack and Jill" `;
 
Old 12-26-2014, 04:46 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Use Crypt::OpenSSL::AES? Or else pick one from http://search.cpan.org/search?query=crypt&mode=module ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crypt() perl function to encrypt Password in shell scripts or How Encrypt passwords ? balakrishnay Linux - General 13 01-14-2010 09:35 AM
How can I encrypt a perl script? abefroman Programming 15 11-17-2009 10:45 PM
Encryption and Decryption of file krounak Programming 2 06-24-2009 11:48 PM
How to Encrypt <STDIN> in PERL 5.8 SPo2 Programming 2 01-21-2006 12:46 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration