Securing database keys for client-side processing
- by danp
I have a tree of information which is sent to the client in a JSON object. In that object, I don't want to have raw IDs which are coming from the database. I thought of making a hash of the id and a field in the object (title, for example) or a salt, but I'm worried that this might have a serious effect on processing overhead.
SELECT * FROM `things` where md5(concat(id,'some salt')) = md5('1some salt');
Is there a standard practice for obscuring IDs in this kind of situation?