#!/usr/bin/perl use warnings; use Crypt::DES; my $key = pack("H16", "0123456789ABCDEF"); my $cipher = new Crypt::DES $key; my $plaintext = "neshataf"; my $ciphertext = $cipher->encrypt($plaintext); # NB - 8 bytes $plaintext = $cipher->decrypt($ciphertext); print unpack("H16", $ciphertext), "\n"; print unpack("H16", $plaintext), "\n";