Question

I wish to publish my app with open source as example for users. The problem is that I have class that downloads from ftp, and there is password and username written in the class. I wish to hide this information from user. I made an external jar file but with site like: http://jd.benow.ca/ that is Java Decompiler it can be easily opened, how can I hide and make it hard to hack to the username and password that written in one of my classes?

Was it helpful?

Solution 2

In case of an open source project, use web service for assigning username and password to the user who is using project with there application. To implement this, you need to implement some SOAP base approach with axis-2 in java, if that LIB is build in java and simply call the methods with your business logic.

Last but not the least, try to create username and password for the user who download's this LIB so that you don't need to share your username and password with the jar of source files .

OTHER TIPS

Creates a file where you'll register your username and password. Then you just have to never commit this file in your repository and not share it.

This topic is very similar to yours, maybe the answer will interest you: How can I protect MySQL username and password from decompiling?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top