removed unnecessary catch

This commit is contained in:
Dave
2015-06-28 21:32:24 +02:00
parent e3873ed22c
commit bd931e1dce

View File

@@ -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));