I'm building an iPhone application that has to communicate with a MySQL database through a PHP API.
Now obviously, I don't want anyone to have access to my database. Therefore, I want to put some decent security in the API and the app.
After some research, I found out that this may be a good way:
Building Secure Public API with PHP/MYSQL
It basically says that the code performs some math on the variable entered by the user on the app side. This math returns a value. Then, you perform the same math on the variables on the API side. if the values are the same, you know that the API gets save request.
The problem is, the SO post I linked to above is about an PHP application AND API. I have an app written in Objective-C and a PHP API, but I want to perform the same kind of trick.
Is there a way to put this kind of security into a service with a Obj-C app and PHP API? if not, what would be a better idea to secure my service?