removed unnecessary catch
This commit is contained in:
@@ -234,13 +234,7 @@ public class NoUtilTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testEncryptionDecryptionRSA() throws NoSuchAlgorithmException,
|
public void testEncryptionDecryptionRSA() throws NoSuchAlgorithmException,
|
||||||
NoSuchProviderException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
NoSuchProviderException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
|
||||||
KeyPairGenerator kpg;
|
KeyPairGenerator kpg = KeyPairGenerator.getInstance(NoUtil.KEYPAIR_ALGORITHM);
|
||||||
try {
|
|
||||||
kpg = KeyPairGenerator.getInstance(NoUtil.KEYPAIR_ALGORITHM);
|
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
throw new NoDashFatalException("Value for KEYPAIR_ALGORITHM is not valid.", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
kpg.initialize(NoUtil.RSA_STRENGTH,
|
kpg.initialize(NoUtil.RSA_STRENGTH,
|
||||||
SecureRandom.getInstance(NoUtil.SECURERANDOM_ALGORITHM, NoUtil.SECURERANDOM_PROVIDER));
|
SecureRandom.getInstance(NoUtil.SECURERANDOM_ALGORITHM, NoUtil.SECURERANDOM_PROVIDER));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user