Skip to content

MajorChump/php-xxhash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-xxHash

A PHP extension to add support for the xxHash fast hashing algorithm.

xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. It successfully completes the SMHasher test suite which evaluates collision, dispersion and randomness qualities of hash functions.

PHP7 Compatability

Please note at the moment the master branch should be used for PHP 5.x and develop branch should be used for PHP 7.x

Installation Instructions

###Unix:

   phpize
   ./configure --enable-xxhash
   make
   sudo make install

###Windows: Follow this guide until Compile step 4. Afterwards, run:

   configure --enable-xxhash=shared
   nmake

The library can be found in C:\php-sdk\phpdev\vc14\x64\php-VERSION-src\x64\Release_TS\php_xxhash.dll

Don't forget to load the extension in via php.ini or the like.

Usage Instructions

Upon installation and enabling the extension within php.ini the following two new functions will be available to you:

string xxhash32(string $data, int $seed);
string xxhash64(string $data, int $seed);

In both cases a string will be returned, representing the digest (hash) of the $data input.

Credits

  • Original implementation of php-xxhash by Stuart Herbert.
  • xxHash by Yann Collet.

Licence

BSD 2-clause license.

About

PHP extension for the xxhash library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.1%
  • Other 0.9%