Jump to content


Photo

Crypt function


  • Please log in to reply
3 replies to this topic

#1 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 05 July 2006 - 04:46 PM

Is there a maximum length  for the  cyphertext  returned by crypt?.  we are using  it to
encrypt passwords that are at most 10 digits long with a six digit seed.
We need to set the  column length in mySQL.
Thanks,

Jennifer

#2 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 05 July 2006 - 04:49 PM

Why not use the md5 formatt to encrypt passwords?

md5($_POST['password'])

#3 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 05 July 2006 - 05:06 PM

Why not use the md5 formatt to encrypt passwords?

md5($_POST['password'])

Do md5($_POST['password']) and split it as per your string length count.... with ...
split($md5_output,$req_length);

Thank you,
Karthi Keyan.

www.karthi.us

#4 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 05 July 2006 - 05:26 PM

Why not use the md5 formatt to encrypt passwords?

md5($_POST['password'])

Do md5($_POST['password']) and split it as per your string length count.... with ...
split($md5_output,$req_length);

Thank you,
Karthi Keyan.


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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users