class AESEncryption {

    public static String encryptUriPassword(final String rawUri) throws GeneralSecurityException {
        try {
            URI uri = new URI(rawUri);
            UserInfo userInfo = extractCredentials(uri);
            if (userInfo != null && userInfo.password != null) {
                userInfo.password = encrypt(userInfo.password);
                return setCredentials(uri, userInfo).toString();
            } else {
                return rawUri;
            }
        } catch (URISyntaxException e) {
            throw new TDPException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);
        }
    }

    private  AESEncryption();

}