user812120
user812120

Reputation: 585

Encrypt in PHP, Decrypt in Perl

$key = "12345678876543211234567887654321";
$iv = "1234567887654321";
$plaindata = "String to be encrypted.";

$enc = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaindata, MCRYPT_MODE_CBC, $iv));

echo($enc);

Output:

EIZDQJWOIepUeNjFL2wl3RYA5bDmFd05Xu6z4e0aiWQ=

How this could be decrypted in Perl???

Upvotes: 2

Views: 1394

Answers (2)

Dave Cross
Dave Cross

Reputation: 69274

Looks like you'll need a combination of MIME::Base64 and MCrypt.

Upvotes: 2

Arfeen
Arfeen

Reputation: 2623

There is a package in cpan .. MCrypt

http://search.cpan.org/perldoc?MCrypt

Check this out

Upvotes: 1

Related Questions