diff options
author | markm <markm@FreeBSD.org> | 1996-02-10 15:32:26 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1996-02-10 15:32:26 +0000 |
commit | ac425672272c2be2c8ff171a3ae8851e8219740f (patch) | |
tree | 7f2ca2641f62d16f40486aa33320707c46a50d89 /secure/lib/libdes/t | |
download | FreeBSD-src-ac425672272c2be2c8ff171a3ae8851e8219740f.zip FreeBSD-src-ac425672272c2be2c8ff171a3ae8851e8219740f.tar.gz |
This is the long-awaited new DES library. Over the next couple of days
will be properly built into the system.
Diffstat (limited to 'secure/lib/libdes/t')
-rw-r--r-- | secure/lib/libdes/t/perl | 0 | ||||
-rw-r--r-- | secure/lib/libdes/t/test | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/secure/lib/libdes/t/perl b/secure/lib/libdes/t/perl new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/secure/lib/libdes/t/perl diff --git a/secure/lib/libdes/t/test b/secure/lib/libdes/t/test new file mode 100644 index 0000000..97acd05 --- /dev/null +++ b/secure/lib/libdes/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"; + |