natalieG Posted July 5, 2006 Share Posted July 5, 2006 Is there a maximum length for the cyphertext returned by crypt?. we are using it toencrypt passwords that are at most 10 digits long with a six digit seed.We need to set the column length in mySQL.Thanks,Jennifer Quote Link to comment https://forums.phpfreaks.com/topic/13752-crypt-function/ Share on other sites More sharing options...
xyn Posted July 5, 2006 Share Posted July 5, 2006 Why not use the md5 formatt to encrypt passwords?md5($_POST['password']) Quote Link to comment https://forums.phpfreaks.com/topic/13752-crypt-function/#findComment-53421 Share on other sites More sharing options...
karthikeyan_coder Posted July 5, 2006 Share Posted July 5, 2006 [quote author=xyn link=topic=99539.msg392027#msg392027 date=1152118188]Why not use the md5 formatt to encrypt passwords?md5($_POST['password'])[/quote]Do md5($_POST['password']) and split it as per your string length count.... with ... split($md5_output,$req_length);Thank you,Karthi Keyan. Quote Link to comment https://forums.phpfreaks.com/topic/13752-crypt-function/#findComment-53428 Share on other sites More sharing options...
Koobi Posted July 5, 2006 Share Posted July 5, 2006 [quote author=karthikeyan_coder link=topic=99539.msg392035#msg392035 date=1152119164][quote author=xyn link=topic=99539.msg392027#msg392027 date=1152118188]Why not use the md5 formatt to encrypt passwords?md5($_POST['password'])[/quote]Do md5($_POST['password']) and split it as per your string length count.... with ... split($md5_output,$req_length);Thank you,Karthi Keyan.[/quote]that wouldn't be accurate...because an MD5 hash value can differ by just one character so if you have two similar MD5 values and you trim it, and if the single character that distinguishes them was trimmed, the two values would be identical. Quote Link to comment https://forums.phpfreaks.com/topic/13752-crypt-function/#findComment-53437 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.