renaming to adhere to GoogleStyle conventions

This commit is contained in:
Dave
2015-06-28 21:50:46 +02:00
parent 6ff5e60046
commit a40d5e9738
6 changed files with 27 additions and 27 deletions

View File

@@ -124,7 +124,7 @@ public class NoUtilTest {
}
@Test
public void testByteKeyEncryptionDecryptionAES() throws IllegalBlockSizeException, BadPaddingException {
public void testByteKeyEncryptionDecryptionAes() throws IllegalBlockSizeException, BadPaddingException {
final byte[] originalBytes = {'s', 'o', 'm', 'e', 'b', 'y', 't', 'e', 's'};
final byte[] originalByteKey = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd'};
@@ -171,7 +171,7 @@ public class NoUtilTest {
}
@Test
public void testCharKeyEncryptionDecryptionAES() throws IllegalBlockSizeException, BadPaddingException {
public void testCharKeyEncryptionDecryptionAes() throws IllegalBlockSizeException, BadPaddingException {
final byte[] originalBytes = {'s', 'o', 'm', 'e', 'b', 'y', 't', 'e', 's'};
final char[] originalCharKey = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd'};
@@ -215,7 +215,7 @@ public class NoUtilTest {
}
@Test
public void testNoKeyEncryptionDecryptionAES() throws IllegalBlockSizeException, BadPaddingException {
public void testNoKeyEncryptionDecryptionAes() throws IllegalBlockSizeException, BadPaddingException {
final byte[] originalBytes = {'s', 'o', 'm', 'e', 'b', 'y', 't', 'e', 's'};
byte[] bytes = Arrays.copyOf(originalBytes, originalBytes.length);
@@ -232,7 +232,7 @@ public class NoUtilTest {
}
@Test
public void testEncryptionDecryptionRSA() throws NoSuchAlgorithmException,
public void testEncryptionDecryptionRsa() throws NoSuchAlgorithmException,
NoSuchProviderException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
KeyPairGenerator kpg = KeyPairGenerator.getInstance(NoUtil.KEYPAIR_ALGORITHM);
kpg.initialize(NoUtil.RSA_STRENGTH,
@@ -245,15 +245,15 @@ public class NoUtilTest {
final byte[] originalBytes = {'s', 'o', 'm', 'e', 'b', 'y', 't', 'e', 's'};
byte[] bytes = Arrays.copyOf(originalBytes, originalBytes.length);
byte[] encrypted = NoUtil.encryptRSA(bytes, keyPair.getPublic());
byte[] encrypted = NoUtil.encryptRsa(bytes, keyPair.getPublic());
try {
NoUtil.decryptRSA(encrypted, keyPair2.getPrivate());
NoUtil.decryptRsa(encrypted, keyPair2.getPrivate());
fail("Did not throw exception with incorrect private key.");
} catch (BadPaddingException e) {
// Do nothing, correct
}
byte[] decrypted = NoUtil.decryptRSA(encrypted, keyPair.getPrivate());
byte[] decrypted = NoUtil.decryptRsa(encrypted, keyPair.getPrivate());
assertTrue(Arrays.equals(originalBytes, decrypted));
}