diff options
author | Thai Duong <thaidn@users.noreply.github.com> | 2017-02-07 17:01:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 17:01:34 -0800 |
commit | 7dfe46ba87452939e970ae8a281c3393f9e6ec34 (patch) | |
tree | 36f05cf09becbb19fad76cc90cac26846d01e296 /java/com/google/security/wycheproof/testcases | |
parent | 62e1bf0ec4cefd740890fda1a660cee9f93c9850 (diff) | |
download | wycheproof-7dfe46ba87452939e970ae8a281c3393f9e6ec34.tar.gz |
Typo and style fixes (#25)
Diffstat (limited to 'java/com/google/security/wycheproof/testcases')
3 files changed, 6 insertions, 5 deletions
diff --git a/java/com/google/security/wycheproof/testcases/DhiesTest.java b/java/com/google/security/wycheproof/testcases/DhiesTest.java index 3e5bbe3..2a4815c 100644 --- a/java/com/google/security/wycheproof/testcases/DhiesTest.java +++ b/java/com/google/security/wycheproof/testcases/DhiesTest.java @@ -71,9 +71,9 @@ public class DhiesTest extends TestCase { } /** - * WARNING: This test uses weak crypto (i.e. DHIESWithAES), if supported. Checks that key agreement - * using DHIES works in the sense that it can decrypt what it encrypts. Unfortunately it seems that - * there is no secure mode using AES. + * WARNING: This test uses weak crypto (i.e. DHIESWithAES), if supported. Checks that key + * agreement using DHIES works in the sense that it can decrypt what it encrypts. Unfortunately it + * seems that there is no secure mode using AES. */ @SuppressWarnings("InsecureCryptoUsage") public void testDhiesBasic() throws Exception { diff --git a/java/com/google/security/wycheproof/testcases/DsaTest.java b/java/com/google/security/wycheproof/testcases/DsaTest.java index 0e94797..edfaa74 100644 --- a/java/com/google/security/wycheproof/testcases/DsaTest.java +++ b/java/com/google/security/wycheproof/testcases/DsaTest.java @@ -671,7 +671,7 @@ public class DsaTest extends TestCase { + "22e342be484c05763939601cd667", "300a090380fe01090380fe01", }; - + @SuppressWarnings("InsecureCryptoUsage") public void testVectors( String[] signatures, 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)); } |