test_class.declarator: cipher
test_class.original_string: JolokiaCipher cipher;
test_class.type: JolokiaCipher
test_class.var_name: cipher
test_class.declarator: clearText = "veryOpenText"
test_class.original_string: String clearText = "veryOpenText";
test_class.type: String
test_class.var_name: clearText
test_class.declarator: encryptedText = "ibeHrdCOonkH7d7YnH7sarQLbwOk1ljkkM/z8hUhl4c="
test_class.original_string: String encryptedText = "ibeHrdCOonkH7d7YnH7sarQLbwOk1ljkkM/z8hUhl4c=";
test_class.type: String
test_class.var_name: encryptedText
test_class.file: agent/core/src/test/java/org/jolokia/util/JolokiaCipherTest.java
test_class.identifier: JolokiaCipherTest
test_case.body: @Test
      public void testDecrypt() throws Exception {
          String clear = cipher.decrypt(encryptedText);
          assertEquals(clearText, clear);
      }
test_case.class_method_signature: JolokiaCipherTest.testDecrypt()
test_case.full_signature: @Test public void testDecrypt()
test_case.identifier: testDecrypt
test_case.invocations: decrypt assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDecrypt()
focal_class.declarator: SALT_SIZE = 8
focal_class.modifier: private static final
focal_class.original_string: private static final int SALT_SIZE = 8;
focal_class.type: int
focal_class.var_name: SALT_SIZE
focal_class.declarator: CHUNK_SIZE = 16
focal_class.modifier: private static final
focal_class.original_string: private static final int CHUNK_SIZE = 16;
focal_class.type: int
focal_class.var_name: CHUNK_SIZE
focal_class.declarator: JOLOKIA_CYPHER_PASSWORD = "META-INF/jolokia-password"
focal_class.modifier: public static final
focal_class.original_string: public static final String JOLOKIA_CYPHER_PASSWORD = "META-INF/jolokia-password";
focal_class.type: String
focal_class.var_name: JOLOKIA_CYPHER_PASSWORD
focal_class.declarator: digest
focal_class.modifier: private
focal_class.original_string: private MessageDigest digest;
focal_class.type: MessageDigest
focal_class.var_name: digest
focal_class.declarator: random
focal_class.modifier: private
focal_class.original_string: private Random random;
focal_class.type: Random
focal_class.var_name: random
focal_class.declarator: keyHolder
focal_class.modifier: private
focal_class.original_string: private KeyHolder keyHolder;
focal_class.type: KeyHolder
focal_class.var_name: keyHolder
focal_class.file: agent/core/src/main/java/org/jolokia/util/JolokiaCipher.java
focal_class.identifier: JolokiaCipher
focal_class.class_method_signature: JolokiaCipher.JolokiaCipher()
focal_class.full_signature: public  JolokiaCipher()
focal_class.identifier: JolokiaCipher
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  JolokiaCipher()
focal_class.class_method_signature: JolokiaCipher.JolokiaCipher(KeyHolder pKeyHolder)
focal_class.full_signature: public  JolokiaCipher(KeyHolder pKeyHolder)
focal_class.identifier: JolokiaCipher
focal_class.modifiers: public
focal_class.parameters: (KeyHolder pKeyHolder)
focal_class.signature:  JolokiaCipher(KeyHolder pKeyHolder)
focal_class.class_method_signature: JolokiaCipher.encrypt(final String pText)
focal_class.full_signature: public String encrypt(final String pText)
focal_class.identifier: encrypt
focal_class.modifiers: public
focal_class.parameters: (final String pText)
focal_class.return: String
focal_class.signature: String encrypt(final String pText)
focal_class.class_method_signature: JolokiaCipher.decrypt(final String pEncryptedText)
focal_class.full_signature: public String decrypt(final String pEncryptedText)
focal_class.identifier: decrypt
focal_class.modifiers: public
focal_class.parameters: (final String pEncryptedText)
focal_class.return: String
focal_class.signature: String decrypt(final String pEncryptedText)
focal_class.class_method_signature: JolokiaCipher.getSalt(final int sz)
focal_class.full_signature: private byte[] getSalt(final int sz)
focal_class.identifier: getSalt
focal_class.modifiers: private
focal_class.parameters: (final int sz)
focal_class.return: byte[]
focal_class.signature: byte[] getSalt(final int sz)
focal_class.class_method_signature: JolokiaCipher.createCipher(byte[] salt, final int mode)
focal_class.full_signature: private Cipher createCipher(byte[] salt, final int mode)
focal_class.identifier: createCipher
focal_class.modifiers: private
focal_class.parameters: (byte[] salt, final int mode)
focal_class.return: Cipher
focal_class.signature: Cipher createCipher(byte[] salt, final int mode)
focal_class.class_method_signature: JolokiaCipher.getKeyAsBytes()
focal_class.full_signature: private byte[] getKeyAsBytes()
focal_class.identifier: getKeyAsBytes
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getKeyAsBytes()
focal_method.body: public String decrypt(final String pEncryptedText) throws GeneralSecurityException {
          byte[] allEncryptedBytes = Base64Util.decode(pEncryptedText);
          int totalLen = allEncryptedBytes.length;
          byte[] salt = new byte[SALT_SIZE];
  
          System.arraycopy(allEncryptedBytes, 0, salt, 0, SALT_SIZE);
          byte padLen = allEncryptedBytes[SALT_SIZE];
  
          byte[] encryptedBytes = new byte[totalLen - SALT_SIZE - 1 - padLen];
          System.arraycopy(allEncryptedBytes, SALT_SIZE + 1, encryptedBytes, 0, encryptedBytes.length);
  
          Cipher cipher = createCipher(salt, Cipher.DECRYPT_MODE);
          byte[] clearBytes = cipher.doFinal(encryptedBytes);
  
          return new String(clearBytes, Charset.forName("UTF-8"));
      }
focal_method.class_method_signature: JolokiaCipher.decrypt(final String pEncryptedText)
focal_method.full_signature: public String decrypt(final String pEncryptedText)
focal_method.identifier: decrypt
focal_method.invocations: decode arraycopy arraycopy createCipher doFinal forName
focal_method.modifiers: public
focal_method.parameters: (final String pEncryptedText)
focal_method.return: String
focal_method.signature: String decrypt(final String pEncryptedText)