I would suggest using a proxy that returns json or xml after the request. Thus, you can create protection from the server, set honeypot traps, create your own encoder decoder for requests, send data via https to prevent listening.
What you can also try is to save the username and password in a string and pass them as variables. then create a complex matrix of similar things and do fairly complex things with it to wear out the hacker so that he loses interest after two hours trying to find your code.
You may also consider entering a password into the dll library of your native library or .so depending on your platform ...
the problem remains, the hacker should only implement his piece of code, and he has full access, so id strongly recommends a proxy.
source share