tightened up return on KeyAlgorithmsBridge.EstimateIterationsResult

This commit is contained in:
Micah Silverman 2021-10-13 12:12:58 -04:00
parent 588c7919ff
commit 09a19d3597
1 changed files with 3 additions and 2 deletions

View File

@ -231,8 +231,9 @@ public final class KeyAlgorithmsBridge {
}
double average = sumX / points.size();
//ensure our average is at least as much as the smallest work factor that got us closest to desiredMillis:
estimateIterationsResultBuilder.setEstimatedIterations((int) Math.max(average, minWorkFactor));
return estimateIterationsResultBuilder.build();
return estimateIterationsResultBuilder
.setEstimatedIterations((int) Math.max(average, minWorkFactor))
.build();
}
private static class Point {