Skip to content

Commit

Permalink
reuse SecureRandom instance
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Sep 27, 2024
1 parent 2fb7171 commit 6fc8ba7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,9 @@ private static byte[] getChallengeIndex(final Context context) {
}
}

private static final SecureRandom random = new SecureRandom();

private static byte[] getChallenge() {
final SecureRandom random = new SecureRandom();
final byte[] challenge = new byte[CHALLENGE_LENGTH];
random.nextBytes(challenge);
return challenge;
Expand Down

0 comments on commit 6fc8ba7

Please sign in to comment.