You are here: Re: Sha1 support in PHP « All PHP « IT news, forums, messages
Re: Sha1 support in PHP

Posted by Sander on 09/21/05 12:19

"Shabam" <chalupa@yomama-nospam.com> schreef in bericht
news:2p-dnZ0l69mtv6zeRVn-hA@adelphia.com...
> How do I find out if my PHP supports SHA1?
>
> And if it doesn't how do I compile it in?
>
>

It depends on the PHP version you are using. PHP>=4.3.0 and PHP 5.x has this
standard. When you have a version that is outdated:


*****from the comments of http://nl2.php.net/sha1 *****

install the mhash library (see http://mhash.sourceforge.net)

then, sha1 can be implemented as follows:

function sha1($hash_source) {
$hash = mhash(MHASH_SHA1, $hash_source);
$hex_hash = bin2hex($hash);
return $hex_hash;
}
*********** end of the comments ******

But you better update to the latest version anyway.

Good Luck,


Sander Swuste

 

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

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