aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/security/wycheproof/testcases/EciesTest.java
diff options
context:
space:
mode:
authorThai Duong <thaidn@users.noreply.github.com>2017-02-07 17:01:34 -0800
committerGitHub <noreply@github.com>2017-02-07 17:01:34 -0800
commit7dfe46ba87452939e970ae8a281c3393f9e6ec34 (patch)
tree36f05cf09becbb19fad76cc90cac26846d01e296 /java/com/google/security/wycheproof/testcases/EciesTest.java
parent62e1bf0ec4cefd740890fda1a660cee9f93c9850 (diff)
downloadwycheproof-7dfe46ba87452939e970ae8a281c3393f9e6ec34.tar.gz
Typo and style fixes (#25)
Diffstat (limited to 'java/com/google/security/wycheproof/testcases/EciesTest.java')
-rw-r--r--java/com/google/security/wycheproof/testcases/EciesTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/google/security/wycheproof/testcases/EciesTest.java b/java/com/google/security/wycheproof/testcases/EciesTest.java
index e8b1fe1..bd29bf8 100644
--- a/java/com/google/security/wycheproof/testcases/EciesTest.java
+++ b/java/com/google/security/wycheproof/testcases/EciesTest.java
@@ -217,6 +217,7 @@ public class EciesTest extends TestCase {
fail("This should not work");
} catch (GeneralSecurityException ex) {
// This is as expected
+ // Bouncy Castle 1.56 throws this exception
} catch (Exception ex) {
fail("Expected subclass of java.security.GeneralSecurityException, but got: "
+ ex.getClass().getName());
@@ -284,7 +285,7 @@ public class EciesTest extends TestCase {
byte[] message = "Hello".getBytes("UTF-8");
eciesA.init(Cipher.ENCRYPT_MODE, keyPair.getPublic());
byte[] ciphertext = eciesA.doFinal(message);
- eciesB.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), eciesA.getParameters());
+ eciesB.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), eciesB.getParameters());
byte[] decrypted = eciesB.doFinal(ciphertext);
assertEquals(TestUtil.bytesToHex(message), TestUtil.bytesToHex(decrypted));
}