Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2022-08-03 (1 month ago) | | Not yet rated by the users | | Total: 45 This week: 26 | | All time: 10,413 This week: 5 |
|
Description | | Author |
This package can generate hash values of a string using Murmurhash.
It takes a given string and a seed integer value as parameters.
The package computes the hash value of the string using the Murmurhash algorithm. Innovation Award
August 2022
Nominee
Vote |
Hashing is an operation that computes a value from a string of data.
Hashing operations help check the integrity of data that may be transmitted between a source computer and a destination computer to detect data transmission failures caused by external interferences.
In environments in which security is an important aspect, developers should use cryptographic hashing algorithms to detect malicious alteration of data by people with bad intentions.
In environments where security is not essential due to the low risk of alteration of data by bad-intentioned people, developers can use non-cryptographic algorithms.
Such algorithms do not require so much CPU processing power and can run faster.
Murmurhash is a non-cryptographic algorithm.
This package provides a pure PHP implementation of the Murmurhash algorithm. Therefore it does not require that particular cryptography PHP extensions are available to use this class.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 2x |
|
Details
MurmurHash3
PHP Implementation of MurmurHash3
More information about these algorithms can be found at:
Porting of the MurmurHash3 JavaScript version created by Gary Court (https://github.com/garycourt/murmurhash-js)
Installation
Use composer :
composer require lastguest/murmurhash
Usage
You can retrieve an hash via hash3
static method of class Murmur
<?php
use lastguest\Murmur;
echo Murmur::hash3("Hello World");
// cnd0ue
You can pass a precise seed positive integer as second parameter
<?php
use lastguest\Murmur;
echo Murmur::hash3("Hello World", 1234567);
// qtq2u
If you need the integer hash, use the hash3_int
method
<?php
use lastguest\Murmur;
echo Murmur::hash3_int("Hello World");
// 427197390
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.