Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

LIII. hash Functions

Введение

Message Digest (hash) engine. Allows direct or incremental processing of arbitrary length messages using a variety of hashing algorithms.

Требования

The Hash extension requires no external libraries and is enabled by default as of PHP 5.1.2. It may be explicitly disabled by using the --disable-hash switch to configure. Earlier versions of PHP may incorporate the Hash extension by installing the PECL module.

Предопределенные константы

Перечисленные ниже константы определены данным расширением и могут быть доступны только в том случае, если PHP был собран с поддержкой этого расширения или же в том случае, если данное расширение подгружается во время выполнения.

HASH_HMAC (integer)

Optional flag for hash_init(). Indicates that the HMAC digest-keying algorithm should be applied to the current hashing context.

Содержание
hash_algos -- Return a list of registered hashing algorithms
hash_file -- Generate a hash value using the contents of a given file
hash_final -- Finalize an incremental hash and return resulting digest
hash_hmac_file -- Generate a keyed hash value using the HMAC method and the contents of a given file
hash_hmac -- Generate a keyed hash value using the HMAC method
hash_init -- Initialize an incremental hashing context
hash_update_file -- Pump data into an active hashing context from a file
hash_update_stream -- Pump data into an active hashing context from an open stream
hash_update -- Pump data into an active hashing context
hash -- Generate a hash value (message digest)


hash_algos> <gopher_parsedir
Last updated: Fri, 26 Jan 2007
 
add a note add a note User Contributed Notes
hash Functions
rbemrose at vgmusic dot com
16-Oct-2007 06:55
martin:  That's because some distributions, such as FreeBSD's ports and Debian's apt split PHP's modules into different packages.
martin
27-Sep-2007 12:28
I tried to use Hash() function on my PHP 5.2.3 (FreeBSD 6.2) but there was no Hash() function. (it should be available by default from version 5.1.2)

Hash() function was working after installing "security/pecl-hash" port.
nb_removethis_ at wtal dot de
03-Sep-2007 05:24
Some tests with mhash and hash revealed on my machine that hash needs more than twice as long to create a hash than mhash. The average of one million cylces of Haval128, Haval256, Gost, CRC32, MD5, SHA1 and SHA256 was 450ms for mhash and 1150ms for hash.

hash_algos> <gopher_parsedir
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com
Суп с китайскими грибами Z058440144362 Z348613067571