Sonar Fixes, Formatting
[aaf/authz.git] / cadi / core / src / test / java / org / onap / aaf / cadi / test / JU_AES.java
index 67dcb39..72dfc3e 100644 (file)
@@ -19,6 +19,7 @@
  * *
  * *
  ******************************************************************************/
+
 package org.onap.aaf.cadi.test;
 
 import static org.hamcrest.CoreMatchers.*;
@@ -59,7 +60,7 @@ public class JU_AES {
          byte[] keyBytes = new byte[AES.AES_KEY_SIZE/8];
          char[] codeset = Symm.base64.codeset;
          int offset = (Math.abs(codeset[0]) + 47) % (codeset.length - keyBytes.length);
-         for(int i = 0; i < keyBytes.length; ++i) {
+         for (int i = 0; i < keyBytes.length; ++i) {
              keyBytes[i] = (byte)codeset[i+offset];
          }
          aes = new AES(keyBytes, 0, keyBytes.length);
@@ -85,7 +86,7 @@ public class JU_AES {
         byte[] encrypted = aes.encrypt(orig.getBytes());
         byte[] decrypted = aes.decrypt(encrypted);
         assertThat(new String(decrypted), is(orig));
+
         Field aeskeySpec_field = AES.class.getDeclaredField("aeskeySpec");
         aeskeySpec_field.setAccessible(true);
         aeskeySpec_field.set(aes, null);
@@ -121,7 +122,7 @@ public class JU_AES {
 
         CipherInputStream cisEncrypt;
         CipherInputStream cisDecrypt;
-        
+
         // Test CipherInputStream
         baisEncrypt = new ByteArrayInputStream(orig.getBytes());
         cisEncrypt = aes.inputStream(baisEncrypt, true);
@@ -156,7 +157,7 @@ public class JU_AES {
 
         CipherOutputStream cosEncrypt;
         CipherOutputStream cosDecrypt;
-        
+
         // Test CipherOutputStream
         baisEncrypt = new ByteArrayInputStream(orig.getBytes());
         baosEncrypt = new ByteArrayOutputStream();
@@ -190,5 +191,5 @@ public class JU_AES {
             os.write(buffer, 0, len);
         }
     }
-    
+
 }