test_class.declarator: DECRYPTED_URI = "mongodb://toto:truc@dataprep.org/dataprep-db?ssl=toto&truc=machin"
test_class.modifier: public static final
test_class.original_string: public static final String DECRYPTED_URI = "mongodb://toto:truc@dataprep.org/dataprep-db?ssl=toto&truc=machin";
test_class.type: String
test_class.var_name: DECRYPTED_URI
test_class.declarator: ENCRYPTED_URI =
              "mongodb://toto:qxjQWF%2FZsuzzeLzKIop2pQ==@dataprep.org/dataprep-db?ssl=toto&truc=machin"
test_class.modifier: public static final
test_class.original_string: public static final String ENCRYPTED_URI =
              "mongodb://toto:qxjQWF%2FZsuzzeLzKIop2pQ==@dataprep.org/dataprep-db?ssl=toto&truc=machin";
test_class.type: String
test_class.var_name: ENCRYPTED_URI
test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/encrypt/AESEncryptionTest.java
test_class.identifier: AESEncryptionTest
test_case.body: @Test(expected = IllegalBlockSizeException.class)
      public void should_throw_an_exception_when_trying_to_decrypt_a_non_encrypted_value() throws Exception {
          // given
          String src = "Dataprep";
  
          // when
          String encrypted = AESEncryption.decrypt(src);
  
          // then
          Assert.fail("should not reach this point");
      }
test_case.class_method_signature: AESEncryptionTest.should_throw_an_exception_when_trying_to_decrypt_a_non_encrypted_value()
test_case.full_signature: @Test(expected = IllegalBlockSizeException.class) public void should_throw_an_exception_when_trying_to_decrypt_a_non_encrypted_value()
test_case.identifier: should_throw_an_exception_when_trying_to_decrypt_a_non_encrypted_value
test_case.invocations: decrypt fail
test_case.modifiers: @Test(expected = IllegalBlockSizeException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_throw_an_exception_when_trying_to_decrypt_a_non_encrypted_value()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(AESEncryption.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(AESEncryption.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: ALGO = "AES"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGO = "AES";
focal_class.type: String
focal_class.var_name: ALGO
focal_class.declarator: ENCODING = "UTF-8"
focal_class.modifier: private static final
focal_class.original_string: private static final String ENCODING = "UTF-8";
focal_class.type: String
focal_class.var_name: ENCODING
focal_class.declarator: secretKey
focal_class.modifier: private static
focal_class.original_string: private static Key secretKey;
focal_class.type: Key
focal_class.var_name: secretKey
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/encrypt/AESEncryption.java
focal_class.identifier: AESEncryption
focal_class.class_method_signature: AESEncryption.AESEncryption()
focal_class.full_signature: private  AESEncryption()
focal_class.identifier: AESEncryption
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  AESEncryption()
focal_class.class_method_signature: AESEncryption.encrypt(final String src)
focal_class.full_signature: public static String encrypt(final String src)
focal_class.identifier: encrypt
focal_class.modifiers: public static
focal_class.parameters: (final String src)
focal_class.return: String
focal_class.signature: String encrypt(final String src)
focal_class.class_method_signature: AESEncryption.decrypt(final String src)
focal_class.full_signature: public static String decrypt(final String src)
focal_class.identifier: decrypt
focal_class.modifiers: public static
focal_class.parameters: (final String src)
focal_class.return: String
focal_class.signature: String decrypt(final String src)
focal_class.class_method_signature: AESEncryption.decryptUriPassword(final String rawUri)
focal_class.full_signature: public static String decryptUriPassword(final String rawUri)
focal_class.identifier: decryptUriPassword
focal_class.modifiers: public static
focal_class.parameters: (final String rawUri)
focal_class.return: String
focal_class.signature: String decryptUriPassword(final String rawUri)
focal_class.class_method_signature: AESEncryption.encryptUriPassword(final String rawUri)
focal_class.full_signature: public static String encryptUriPassword(final String rawUri)
focal_class.identifier: encryptUriPassword
focal_class.modifiers: public static
focal_class.parameters: (final String rawUri)
focal_class.return: String
focal_class.signature: String encryptUriPassword(final String rawUri)
focal_class.class_method_signature: AESEncryption.extractCredentials(URI uri)
focal_class.full_signature: private static UserInfo extractCredentials(URI uri)
focal_class.identifier: extractCredentials
focal_class.modifiers: private static
focal_class.parameters: (URI uri)
focal_class.return: UserInfo
focal_class.signature: UserInfo extractCredentials(URI uri)
focal_class.class_method_signature: AESEncryption.setCredentials(URI uri, UserInfo userInfo)
focal_class.full_signature: private static URI setCredentials(URI uri, UserInfo userInfo)
focal_class.identifier: setCredentials
focal_class.modifiers: private static
focal_class.parameters: (URI uri, UserInfo userInfo)
focal_class.return: URI
focal_class.signature: URI setCredentials(URI uri, UserInfo userInfo)
focal_class.class_method_signature: AESEncryption.decrypt(final String name, final String src)
focal_class.full_signature: public static String decrypt(final String name, final String src)
focal_class.identifier: decrypt
focal_class.modifiers: public static
focal_class.parameters: (final String name, final String src)
focal_class.return: String
focal_class.signature: String decrypt(final String name, final String src)
focal_class.class_method_signature: AESEncryption.generateKey(byte[] defaultValue)
focal_class.full_signature: private static Key generateKey(byte[] defaultValue)
focal_class.identifier: generateKey
focal_class.modifiers: private static
focal_class.parameters: (byte[] defaultValue)
focal_class.return: Key
focal_class.signature: Key generateKey(byte[] defaultValue)
focal_method.body: public static String decrypt(final String src) throws GeneralSecurityException {
          final Cipher c = Cipher.getInstance(ALGO);
          c.init(Cipher.DECRYPT_MODE, secretKey);
          final byte[] decodedValue = Base64.getDecoder().decode(src);
          final byte[] decValue = c.doFinal(decodedValue);
          try {
              return new String(decValue, ENCODING);
          } catch (UnsupportedEncodingException e) {
              throw new TDPException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);
          }
      }
focal_method.class_method_signature: AESEncryption.decrypt(final String src)
focal_method.full_signature: public static String decrypt(final String src)
focal_method.identifier: decrypt
focal_method.invocations: getInstance init decode getDecoder doFinal
focal_method.modifiers: public static
focal_method.parameters: (final String src)
focal_method.return: String
focal_method.signature: String decrypt(final String src)