Data Encryption Standard: Difference between revisions

m
(→‎{{header|D}}: Update to DMD v2.102.0)
m (→‎{{header|Wren}}: Minor tidy)
 
(2 intermediate revisions by 2 users not shown)
Line 2,897:
 
=={{header|Perl}}==
<syntaxhighlight lang="perl">#use 20200723 added Perl programming solutionstrict;
 
use strict;
use warnings;
 
use Crypt::DES;
 
my $key = pack("H*", "0E329232EA6D0D73");
my $cipher = new Crypt::DES ->new($key);
my $ciphertext = $cipher->encrypt(pack("H*", "8787878787878787"));
print "Encoded : ", unpack("H*", $ciphertext), "\n";
Line 3,579 ⟶ 3,576:
Thanks to SqrtNegInf for pointing out that \r\n is a single grapheme. ([https://docs.raku.org/type/Str#routine_chomp link 1], [https://docs.raku.org/language/newline link 2])
{{trans|Phix}}
<syntaxhighlight lang="raku" line># 20220222 Updated Raku programming solution
 
my \PC1 = <
Line 5,363 ⟶ 5,360:
{{libheader|Wren-math}}
The second Kotlin version.
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt, Conv
import "./math" for Boolean
 
var PC1 = [
9,476

edits