forked from I2P_Developers/i2p.i2p
KeyGen test tweaks
This commit is contained in:
@ -492,16 +492,18 @@ public final class KeyGenerator {
|
||||
stime += mid - start;
|
||||
vtime += end - mid;
|
||||
if (!ok)
|
||||
throw new GeneralSecurityException(type + " V(S(data)) fail");
|
||||
throw new GeneralSecurityException(type + " V(S(data)) fail on run " + i);
|
||||
if (!ok2)
|
||||
throw new GeneralSecurityException(type + " V(S(H(data))) fail");
|
||||
throw new GeneralSecurityException(type + " V(S(H(data))) fail on run" + i);
|
||||
}
|
||||
stime /= 1000*1000;
|
||||
vtime /= 1000*1000;
|
||||
// we do two of each per run above
|
||||
int runs2 = runs * 2;
|
||||
System.out.println(type + " sign/verify " + runs + " times: " + (vtime+stime) + " ms = " +
|
||||
(((double) stime) / runs) + " each sign, " +
|
||||
(((double) vtime) / runs) + " each verify, " +
|
||||
(((double) (stime + vtime)) / runs) + " s+v");
|
||||
(((double) stime) / runs2) + " each sign, " +
|
||||
(((double) vtime) / runs2) + " each verify, " +
|
||||
(((double) (stime + vtime)) / runs2) + " s+v");
|
||||
}
|
||||
|
||||
/******
|
||||
|
Reference in New Issue
Block a user