Skip to content

Commit

Permalink
removed use of new intValuesExact().
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Jan 14, 2022
1 parent 0502428 commit 269be03
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.bouncycastle.operator.MacAlgorithmIdentifierFinder;
import org.bouncycastle.operator.MacCalculator;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.util.BigIntegers;

/**
* A builder for RFC 8018 PBE based MAC calculators.
Expand Down Expand Up @@ -157,8 +158,8 @@ public MacCalculator build(final char[] password)
else
{
salt = pbeParams.getSalt();
iterationCount = pbeParams.getIterationCount().intValueExact();
keySize = pbeParams.getKeyLength().intValueExact() * 8;
iterationCount = BigIntegers.intValueExact(pbeParams.getIterationCount());
keySize = BigIntegers.intValueExact(pbeParams.getKeyLength()) * 8;
}

SecretKeyFactory secFact = helper.createSecretKeyFactory("PBKDF2");
Expand Down

0 comments on commit 269be03

Please sign in to comment.