I am building an application that interacts with a web service. In order to use that web service I have to login using my actual username and password - there is no other way to use the service.
I do not want to hard code in my details, like so:
String username = "MyUsername";
String password = "MyPassword";
I have thought about encrypting the details and storing them in a file, but, even so, anyone who has some programming experience can easily recover the information by looking at my source code:
File f = load("mydetails.txt");
String[] = recoverDetails(f); //or something like that
What is the safest way for me to store this information?