php crypt function

sinck@ugive.com sinck@ugive.com
Sun, 31 Dec 2000 20:03:12 -0700


\_ Interesting... The PHP info I've read simply says that crypt
\_ returns a hash of the string passed to it with the salt prepended.
\_ Nothing I've seen says anything about limitations on the length of
\_ the string.
Knowing which functions are probably passthroughs takes a while to
guess. 

\_ What I'm trying to accomplish is getting a unique hash from a
\_ string up to 60 characters in length, where the resulting hash is
\_ between 10 and 15 characters long.  Given the same key, I need to
\_ be able to derive the same hash, but I want a reasonably low
\_ probablilty of collisions over a large (10**6) sampling 

\_ (eg., email addresses are unique per user, 
That's a nice thought but won't hold water always.

\_ so a hash that includes their email
\_ address is useful as a seed).  md5 hashes are too long for my
\_ needs.  Any ideas on what might work are welcome.
Can you change your needs to accept md5 hashes?  The magic of hashing
has lots of CS literature...perfect for reading throughout the next
millineum.  :-)

\_ -David (the other one)
aaaaaa two of us!  I knew I should have stayed away from the cloning
lab photocopier.

David