abrahamgarcia27 Posted July 6, 2011 Share Posted July 6, 2011 edituser.php?id=10 I have this user page edit function, but i have a question for my password i have the md5 key could i do the same for my member_id primary key? so instead of edituser.php?id=10 [/code/ it gives me something like this [code] edituser.php?id=asdf54as54f14asdf874asdfasd Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/ Share on other sites More sharing options...
Zane Posted July 6, 2011 Share Posted July 6, 2011 you would have to take the Auto increment off your id field, but yeah. You would also have to change the datatype to accommodate the MD5 Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238875 Share on other sites More sharing options...
gizmola Posted July 6, 2011 Share Posted July 6, 2011 I think what the poster is really asking for is, a way to obfuscate the id. No, you can't use md5 for that, because md5 is a one-way hash. Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238879 Share on other sites More sharing options...
abrahamgarcia27 Posted July 6, 2011 Author Share Posted July 6, 2011 How could i obfuscate the Id? Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238915 Share on other sites More sharing options...
Network_ninja Posted July 6, 2011 Share Posted July 6, 2011 I don't think you need to obfuscate the id when you already have an encrypted password. Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238921 Share on other sites More sharing options...
abrahamgarcia27 Posted July 6, 2011 Author Share Posted July 6, 2011 I dont want to obfusucate the password my database is composed of the following member_id (auto increment) this is the one i want to obfusucate firstname lastname login password (md5) Is there a way to do this? and how would i do it? Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238935 Share on other sites More sharing options...
xyph Posted July 6, 2011 Share Posted July 6, 2011 Why would you want to obfuscate it? You could use the mcrypt functions to do two-way encryption, but I don't see the point. Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238938 Share on other sites More sharing options...
gizmola Posted July 6, 2011 Share Posted July 6, 2011 You can obfuscate it, but obfuscation is not security. I discuss this in this thread and provide one possible solution: http://www.phpfreaks.com/forums/index.php?topic=337566.0 Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238939 Share on other sites More sharing options...
abrahamgarcia27 Posted July 6, 2011 Author Share Posted July 6, 2011 i am sorry i am new to programming and i would want to know what would be the safest way to protect for security issues? Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238943 Share on other sites More sharing options...
xyph Posted July 6, 2011 Share Posted July 6, 2011 You should never use the ID for security. That's what a password is for Quote Link to comment https://forums.phpfreaks.com/topic/241182-md5-primary-key/#findComment-1238947 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.