diff options
author | neonloop | 2021-10-20 14:54:27 +0000 |
---|---|---|
committer | neonloop | 2021-10-20 14:54:27 +0000 |
commit | ea1947ffcc606d757357398b24e74a3f4ecefa07 (patch) | |
tree | 2031b8d4fc4c61063c710a7148378f57e662efbd /3rdparty/des-4.04b/PC2 | |
download | bennugd-ea1947ffcc606d757357398b24e74a3f4ecefa07.tar.gz bennugd-ea1947ffcc606d757357398b24e74a3f4ecefa07.tar.bz2 bennugd-ea1947ffcc606d757357398b24e74a3f4ecefa07.zip |
Initial commit from steward-fu releasemain
Diffstat (limited to '3rdparty/des-4.04b/PC2')
-rw-r--r-- | 3rdparty/des-4.04b/PC2 | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/3rdparty/des-4.04b/PC2 b/3rdparty/des-4.04b/PC2 new file mode 100644 index 0000000..2d56027 --- /dev/null +++ b/3rdparty/des-4.04b/PC2 @@ -0,0 +1,57 @@ +#!/usr/local/bin/perl + +@PC2_C=(14,17,11,24, 1, 5, + 3,28,15, 6,21,10, + 23,19,12, 4,26, 8, + 16, 7,27,20,13, 2, + ); + +@PC2_D=(41,52,31,37,47,55, + 30,40,51,45,33,48, + 44,49,39,56,34,53, + 46,42,50,36,29,32, + ); + +foreach (@PC2_C) { + if ($_ ne "-") + { + $_--; + printf "%2d ",$_; } + else { print "-- "; } + $C{$_}=1; + print "\n" if (((++$i) % 8) == 0); + } +$i=0; +print "\n"; +foreach (@PC2_D) { + if ($_ ne "-") + { + $_-=29; + printf "%2d ",$_; } + else { print "-- "; } + $D{$_}=1; + print "\n" if (((++$i) % 8) == 0); } + +print "\n"; +foreach $i (0 .. 27) + { + $_=$C{$i}; + if ($_ ne "-") {printf "%2d ",$_;} + else { print "-- "; } + print "\n" if (((++$i) % 8) == 0); + } +print "\n"; + +print "\n"; +foreach $i (0 .. 27) + { + $_=$D{$i}; + if ($_ ne "-") {printf "%2d ",$_;} + else { print "-- "; } + print "\n" if (((++$i) % 8) == 0); + } +print "\n"; +sub numsort + { + $a-$b; + } |