gopi_crishna Posted August 2, 2004 Share Posted August 2, 2004 Heloo, I have been working with Dreamweaver and PHP very recently and currently I am working on an Application where users apply for a job online and users enter all the details when filling out the applicaton. One of the field they enter is "SSN"(number) .Now i want this number to be really secure ,so i want that to be encoded when added to the database and when the information is retrieved from the database again the encoded value has to decode and appear exactly the same. So can any one please let me know "if there is any way that i can do this ".Please let me know any method,may be not exactly Encode or decode but i would try any method in getting that number encoded and decoded . Thank You Gopi .K Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/ Share on other sites More sharing options...
morpheus.100 Posted August 2, 2004 Share Posted August 2, 2004 md5 Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6215 Share on other sites More sharing options...
Danno13 Posted August 3, 2004 Share Posted August 3, 2004 I didn't think you could decode with md5? This forum uses md5 to code passwords but then all it does is md5 your password when you type it in and match that to the database. I'm not sure what encryption you could use for what you want. Someone please correct me if i'm wrong here. Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6216 Share on other sites More sharing options...
morpheus.100 Posted August 8, 2004 Share Posted August 8, 2004 Your wrong. The algorithm is now freely available to decode md5 upto 8 chars. With regards your initial question gopi, search the mySQL site for enryption/decryption. Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6237 Share on other sites More sharing options...
gizmola Posted August 9, 2004 Share Posted August 9, 2004 Morpheus: md5() is a one way hash. It was not meant to be used for encryption/decryption and should not be used for such, even via an exploit. Furthermore it's clear from the question that the source (SSN#) is more than 5 characters. With php the standard way to do encryption/decryption is to use the mcrypt library: http://us4.php.net/mcrypt Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6239 Share on other sites More sharing options...
morpheus.100 Posted August 10, 2004 Share Posted August 10, 2004 Who wrote the rules. Are there any. If so someone should write some with regards using a dirty brown colour as a main color for a website, tacky graphics and poor navigation and yellow text. Whilst this not only looks poor to well sighted people I feel that it would discriminate against people with visual imparrities. Now who has a site like that? Mmmmm let me think. INSERT INTO table VALUES (1,AES_ENCRYPT('fieldname','fieldname2')); AES_ENCRYPT() and AES_DECRYPT() were added in MySQL 4.0.2, and can be considered the most cryptographically secure encryption functions currently available in MySQL. It doesnt get any easier. Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6241 Share on other sites More sharing options...
morpheus.100 Posted August 15, 2004 Share Posted August 15, 2004 base64_encode base64_decode Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6255 Share on other sites More sharing options...
gizmola Posted August 15, 2004 Share Posted August 15, 2004 Who wrote the rules. Are there any. If so someone should write some with regards using a dirty brown colour as a main color. Basically you backed yourself into a corner by giving out misinformation, and now you don't want to admit you were wrong? md5() shouldn't be used for encryption/decryption. The "rules" were made by the people who devised the algorithm. As better solutions have now been provided, I guess we can move on. As an aside, hostility on this forum is something we try and avoid. Quote Link to comment https://forums.phpfreaks.com/topic/1910-ideas-to-encode-and-decode-a-number/#findComment-6257 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.