Data Encryption Standard: Difference between revisions
m
→{{header|Wren}}: Minor tidy
(→{{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 warnings;
use Crypt::DES;
my $key = pack("H*", "0E329232EA6D0D73");
my $cipher =
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="
import "./math" for Boolean
var PC1 = [
|