diff options
author | Rob Austein <sra@hactrn.net> | 2006-10-09 16:00:16 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-10-09 16:00:16 +0000 |
commit | eb9264fc2ef786e8c4e3d430834b9b9e9e0b9c0a (patch) | |
tree | a72b0dcff12c4934f29502390553f0b2305b05fa /openssl/vendor/0.9.8d/crypto/des/t/test | |
parent | 3a6e89edc0a52c58e2c08d3de4e360de777f14a7 (diff) |
OpenSSL 0.9.8d base code import
svn path=/openssl/vendor/0.9.8d/CHANGES; revision=373
Diffstat (limited to 'openssl/vendor/0.9.8d/crypto/des/t/test')
-rw-r--r-- | openssl/vendor/0.9.8d/crypto/des/t/test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/openssl/vendor/0.9.8d/crypto/des/t/test b/openssl/vendor/0.9.8d/crypto/des/t/test new file mode 100644 index 00000000..97acd055 --- /dev/null +++ b/openssl/vendor/0.9.8d/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"; + |