duzun/siphash

SipHash PHP implementation (-2-4 so far)

Installs: 10 918

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/duzun/siphash

0.0.1 2017-05-13 12:08 UTC

This package is auto-updated.

Last update: 2025-10-17 11:58:10 UTC


README

SipHash-2-4 implementation written in PHP

Install

With composer

composer require duzun/siphash

Vanilla PHP (no composer)

Copy src/siphash.php to your project, then

require_once 'src/siphash.php';

Usage

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"