Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Crypt::TripleDES doesn't work with perl 5.8 (Linux)

Reply
Thread Tools

Crypt::TripleDES doesn't work with perl 5.8 (Linux)

 
 
Jonas
Guest
Posts: n/a
 
      10-10-2003
I have the following perl program witch i use to encrypt a
password file with.
In perl 5.6 this program works like a charm but when trying it on
the RED HAT EL 3 platform (taroon) is doesnt decrypt the encrypted string right.

Program
use Crypt::TripleDES;

sub generate()
{
print "Filename:";
$filename=<STDIN>;
print "Username:";
$username=<STDIN>;
$passphrase="dbatools";
open(FILE,">$filename")|| die("Error writing to file");
$des = new Crypt::TripleDES;
print FILE $cyphertext = $des->encrypt3 ( $username, $passphrase );
close FILE;
print "\n File generated";
}


sub decrypt()
{
print "Filename:";
$filename=<STDIN>;
$passphrase="dbatools";
open(FILE,"$filename")|| die("File not found");
$cypher=<FILE>;
close FILE;
$des = new Crypt::TripleDES;
print $des->decrypt3 ( $cypher, $passphrase );
}


if ( ! @ARGV )
{
print "Usage:: generate";
}
else
{
if ( "generate" =~ /@ARGV[0]/i )
{
generate();
}
elsif ( "decrypt" =~ /@ARGV[0]/i )
{
decrypt();
}
else
{
print "Usage:: generate|decrypt";
}
}

Have anyone experiensed the same problem.

The Crypt-Triple-Des version is 0.24

Cheers
Jonas
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 04-04-2011 10:00 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 02-27-2011 11:00 PM
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 AM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments