Re: Create a numeric hash from a text string?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 14, 2005 at 02:08:08PM -0600, Richard Lynch wrote:
> On Mon, November 14, 2005 12:41 pm, Brian Dunning wrote:
> > Does anyone know if there's a handy way to create a numeric hash from
> > a text string? I'm trying to generate an integer as a sort of quick &
> > dirty checksum for text strings. Needs to be a decimal integer, not
> > hex or otherwise. Any clever ideas appreciated.   :)
> 
> 
> You're probably better off re-thinking your "needs to be an integer"
> requirement, though, honestly, unless there is some really really
> compelling driving external force at work.

yeah, i would tend to agree.  I'm not sure what your 'Integer'
requirements are but if you use md5() or sha1(), you will more
likely be able to validate the content more reliably vs crc32().

Curt.
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux