Crypt($pass); vs MD5($pass); for encryption in PHP - 12/04/02 01:10 AM
For those of you who don't know Crypt and MD5 are used in PHP to encrypt things(text, files, etc)
Now the syntax as I understand it is
Now I belive MD5 converts to a 32 charater string something like
And Crypt uses 12 charaters I belive if using Standard DES-based.
Okay, here is my issue. When I use crypt I get a different out put each time for the same word or phrase.
When Using MD5, I get the exact same string for every word I type in.
WTF is going on? I read on PHP.net something about using a salt, but I'm not sure I get what they are saying. any help please.....
Now the syntax as I understand it is
Code
crypt: crypt('$password');
Code
MD5: MD5('$password');
Code
MD5('Phrase'); /* Converts "Phrase" to .... */ 243e61e9410a9f577d2d662c67025ee9
Okay, here is my issue. When I use crypt I get a different out put each time for the same word or phrase.
When Using MD5, I get the exact same string for every word I type in.
WTF is going on? I read on PHP.net something about using a salt, but I'm not sure I get what they are saying. any help please.....