You are here: Re: [PHP] Hashing strings « PHP « IT news, forums, messages
Re: [PHP] Hashing strings

Posted by Richard Lynch on 02/17/05 19:54

Gerard Samuel wrote:
> Im currently using md5() to hash strings to be used,
> as an id for a cache system.
> Im trying to determine if md5() would be the fastest,
> *cheapest* solution.
> The only native php functions that I know of are md5() and sha1().
> Are there any other native php functions that hash
> strings?

You may (or may not) want to look at http://php.net/uniqid

I don't think you actually pass in a string to hash so much as just get a
unique number back.

For *SOME* applications this may or may not be suitable, and it could be
faster than those complex hashing algorithms. Or not, especially if you
include the optional entropy argument...

You'd have to benchmark and see to be sure, of course.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация