projects
/
openssl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Import of old SSLeay release: SSLeay 0.9.0b
[openssl.git]
/
perl
/
testmd.pl
1
#!/usr/local/bin/perl
2
3
use ExtUtils::testlib;
4
5
use SSLeay;
6
7
@md=();
8
foreach ("md2", "md5", "sha", "sha1", "mdc2", "ripemd160")
9
{
10
($f=MD->new($_)) ||
11
die "$_ is an unknown message digest algorithm\n";
12
push(@md,$f);
13
}
14
15
while (<>)
16
{
17
foreach $md (@md)
18
{ $md->update($_); }
19
}
20
21
foreach (@md)
22
{
23
$digest=$_->final();
24
printf "%-4s=%s\n",$_->name(),unpack("H*",$digest);
25
}
26