aboutsummaryrefslogtreecommitdiff
path: root/crypto/des/t
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 10:52:47 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 10:52:47 +0000
commitd02b48c63a58ea4367a0e905979f140b7d090f86 (patch)
tree504f62ed3d84799f785b9cd9fab255a21b0e1b0e /crypto/des/t
downloadopenssl-d02b48c63a58ea4367a0e905979f140b7d090f86.zip
openssl-d02b48c63a58ea4367a0e905979f140b7d090f86.tar.gz
openssl-d02b48c63a58ea4367a0e905979f140b7d090f86.tar.bz2
Import of old SSLeay release: SSLeay 0.8.1b
Diffstat (limited to 'crypto/des/t')
-rw-r--r--crypto/des/t/test27
1 files changed, 27 insertions, 0 deletions
diff --git a/crypto/des/t/test b/crypto/des/t/test
new file mode 100644
index 0000000..97acd05
--- /dev/null
+++ b/crypto/des/t/test
@@ -0,0 +1,27 @@
+#!./perl
+
+BEGIN { push(@INC, qw(../../../lib ../../lib ../lib lib)); }
+
+use DES;
+
+$key='00000000';
+$ks=DES::set_key($key);
+@a=split(//,$ks);
+foreach (@a) { printf "%02x-",ord($_); }
+print "\n";
+
+
+$key=DES::random_key();
+print "($_)\n";
+@a=split(//,$key);
+foreach (@a) { printf "%02x-",ord($_); }
+print "\n";
+$str="this is and again into the breach";
+($k1,$k2)=DES::string_to_2keys($str);
+@a=split(//,$k1);
+foreach (@a) { printf "%02x-",ord($_); }
+print "\n";
+@a=split(//,$k2);
+foreach (@a) { printf "%02x-",ord($_); }
+print "\n";
+