https://github.com/duzun/siphash
SipHash-2-4 implementation in PHP
https://github.com/duzun/siphash
Last synced: about 1 month ago
JSON representation
SipHash-2-4 implementation in PHP
- Host: GitHub
- URL: https://github.com/duzun/siphash
- Owner: duzun
- License: mit
- Created: 2017-05-13T09:49:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-13T13:28:52.000Z (over 8 years ago)
- Last Synced: 2025-08-27T09:06:45.478Z (about 1 month ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SipHash [](https://travis-ci.org/duzun/SipHash)
==========[SipHash-2-4](https://131002.net/siphash/) implementation written in PHP
# Install
### With [composer](https://getcomposer.org/)
```sh
composer require duzun/siphash
```### Vanilla PHP (no composer)
Copy `src/siphash.php` to your project, then
```php
require_once 'src/siphash.php';
```# Usage
```php
use duzun\SipHash; // PHP >= 5.3.0// 128-bit $key is a string of max 16 chars
// $message is any string you want to hash
$hash = SipHash::hash_2_4($key, $message); // eg. "6dd48df68066d1bd"
```