This commit was generated by cvs2svn to track changes on a CVS vendor
[openssl.git] / perl / test9.pl
1 #!/usr/local/bin/perl
2
3 use ExtUtils::testlib;
4
5 use SSLeay;
6
7 # 2687145 * 3003 * 10^5072 - 1. 
8
9 $a=SSLeay::BN::set_word(2687145);
10 $b=SSLeay::BN::set_word(3003);
11 $c=SSLeay::BN::set_word(10);
12 $d=SSLeay::BN::set_word(5072);
13 $e=SSLeay::BN::set_word(1);
14
15 print $a->bn2hex()."\n";
16 print $b->bn2hex()."\n";
17 print $c->bn2hex()."\n";
18 print $d->bn2hex()."\n";
19 print $e->bn2hex()."\n";
20
21 $f=(($a->mul($b)->mul($c->exp($d)))->sub($e));
22 #print "$a $b\n";
23
24 $c=$a->mul($b);
25 print "1->".$c->bn2hex()." \n";
26
27 $c=$a*$b;
28 print "2->".$c->bn2hex()." \n";
29 $a*=$b;
30 print "3->$a\n";
31
32 print $f->bn2hex()." $a\n";
33 print $a."\n";
34
35 print "$a=(($b*$c)/$d);\n";
36 $a=(($b*$c)/$d);
37 print "$a\n";
38