Skip to content

Commit

Permalink
Use vars where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvisser committed Nov 14, 2023
1 parent 6cbe038 commit 469d6d4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import javax.crypto.Cipher;
import java.nio.charset.StandardCharsets;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
Expand All @@ -20,9 +19,9 @@ class EncryptionServiceTest {

static {
try {
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA");
var keyPairGen = KeyPairGenerator.getInstance("RSA");
keyPairGen.initialize(2048);
KeyPair pair = keyPairGen.generateKeyPair();
var pair = keyPairGen.generateKeyPair();
PRIVATE_KEY = pair.getPrivate();
PUBLIC_KEY = pair.getPublic();
} catch (NoSuchAlgorithmException e) {
Expand Down

0 comments on commit 469d6d4

Please sign in to comment.