Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example the following test was added:
@Test(timeout = 10000) public void testRSAEncryptionDecryptionProgressive_failAssert2() throws Exception { try { Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey); cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17); cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1); cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18)); byte[] encrypted = cipher.doFinal(); cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey); cipher.update(encrypted, 0, 65); cipher.update(encrypted, 65, 1); cipher.update(encrypted, 66, ((encrypted.length) - 66)); cipher.doFinal(); CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input); cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey); cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15); cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1); encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16)); cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey); cipher.update(encrypted); cipher.doFinal(); CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input); cipher.doFinal(); CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input); org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException"); } catch (GeneralSecurityException eee) { } }
It would be nice to improve this on 2 aspects:
The text was updated successfully, but these errors were encountered:
Fix STAMP-project#419: expected Exception and generate assertion in c…
4104d1a
…atch block
3d72ffd
94878a1
c859d7f
No branches or pull requests
For example the following test was added:
It would be nice to improve this on 2 aspects:
The text was updated successfully, but these errors were encountered: