Data Encryption Standard: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Raku}}: turn comment into a comment) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: future-proof for 5.36) |
||
Line 2,897: | Line 2,897: | ||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
<syntaxhighlight lang="perl"> |
<syntaxhighlight lang="perl">use strict; |
||
use strict; |
|||
use warnings; |
use warnings; |
||
use Crypt::DES; |
use Crypt::DES; |
||
my $key = pack("H*", "0E329232EA6D0D73"); |
my $key = pack("H*", "0E329232EA6D0D73"); |
||
my $cipher = |
my $cipher = Crypt::DES->new($key); |
||
my $ciphertext = $cipher->encrypt(pack("H*", "8787878787878787")); |
my $ciphertext = $cipher->encrypt(pack("H*", "8787878787878787")); |
||
print "Encoded : ", unpack("H*", $ciphertext), "\n"; |
print "Encoded : ", unpack("H*", $ciphertext), "\n"; |