Tag Archives: Perl

HOWTO – Encryption with Perl

I’m a huge fan of encryption, and here I’d like to show you how you can utilize the Crypt::Rijldael module to encrypt any blob of data. First, we need to initialize some modules. use Crypt::Rijndael; use MIME::Base64;use Crypt::Rijndael; use MIME::Base64; Let’s create the encryption function.  The function will take two inputs, the plain text, and the pass key to use.  It will output a base64 encoded blob of data. sub… Read Article →

Sending emails through Gmail from Perl

Sending email through Perl can be done in many ways.  I like to simply call sendmail, but that approach is not always portable between operating systems.  For that, we use Net::SMTP.  But if you plan to send email via Gmail, normal plain ol’ port 25 SMTP won’t work.  For that, we need to switch to TLS/SSL with Authentication. But first, let’s review what the Gmail settings are. Server : smtp.gmail.com… Read Article →

RSA Algorithm in Perl

The RSA algorithm is very cool. It basically allows the exchange of data between two parties by using a private and public key. I’m not going to try and convince or explain what RSA is. I will however show you how to do RSA in Perl from the ground up. The Crypt::RSA module should probably be used instead. I’m not trying to reinvent this module, but rather give a practical… Read Article →