| DIR:/proc/self/root/proc/thread-self/root/usr/bin/ |
| Current File : //proc/self/root/proc/thread-self/root/usr/bin/test_bare_rsa_sha1.pl |
#!/usr/bin/perl -I../../..
use strict;
use warnings;
use Mail::DKIM::Algorithm::rsa_sha1;
unless (-f "private.key")
{
die "File not found: private.key\n";
}
my $rsa_sha1 = new Mail::DKIM::Algorithm::rsa_sha1(
KeyFile => "private.key");
while (<STDIN>)
{
chomp;
$rsa_sha1->PRINT("$_\015\012");
}
$rsa_sha1->CLOSE;
print $rsa_sha1->sign;
|