PHPackages                             luhav/havok-n - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. luhav/havok-n

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

luhav/havok-n
=============

PHP implementation of Havok-N, a modified version of Fletcher &amp; Adler checksums plus an optional iterative hash function.

00PHP

Since Dec 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Luhav/Havok-N_PHP)[ Packagist](https://packagist.org/packages/luhav/havok-n)[ RSS](/packages/luhav-havok-n/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Havok-N PHP Composer Package
============================

[](#havok-n-php-composer-package)

What is Havok-N?
----------------

[](#what-is-havok-n)

A modified version of Fletcher &amp; Adler checksums plus an optional iterative hash function, by Lucy Havok.

Fletcher's Checksum algorithm is way overengineered. Adler had the right idea with many of the tweaks he made to simplify and solidify the algorithm. However, I liked the idea of having a user-defined arbitrary checksum bitdepth, but also make sure that the modulo is always prime so as to reduce checksum collision.

### Table comparison

[](#table-comparison)

   Fletcher Adler Havok   Word Size 8b | 16b | 32b 8b 8b   Bits 16 | 32 | 64 32 arbitrary   Modulo 28 | 216 | 232 65,521 nearest prime under 2Bits   Shift 8 | 16 | 32 16 Bits/2   Iterative Hash no no optional, arbitrary Usage
-----

[](#usage)

```
composer require luhav/havok-n
```

```
use Luhav\HavokN;

$havokN = new HavokN();

$data       = "Toast"; // This is the data you want a sum of. Can be of any type.
$bitdepth   = 16;      // This is sort of like the length of the checksum, but it's not directly proportionate. If you wanted to pretend this is Adler-32, you would put 32 here. Should be an integer.
$iterations = 0;       // Optional. This is the number of iterations over the iterative hash function (defaults to 0).
$havokN->sum($data, $bitdepth, $iterations);
```

Upstream
--------

[](#upstream)

Havok-N is part of the [EmojiHash](https://fossil.peepee.party/emojihash/)project at [Peepee Party](https://peepee.party/), of which I am the creator, maintainer, and current sole contributor. The upstream version of havokn.php can be seen at .

License
-------

[](#license)

Havok-N is licensed under The 3-Clause BSD License with the explicit military disclaimer (SPDX: BSD-3-Clause-No-Military-License). See [LICENSE](LICENSE) for the full text.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd7e4adf722aff71060ae3de40d3f66cd90fa65a47ceb6f850dc718cfad4fe2c?d=identicon)[luhav](/maintainers/luhav)

---

Top Contributors

[![Luhav](https://avatars.githubusercontent.com/u/43188089?v=4)](https://github.com/Luhav "Luhav (4 commits)")

---

Tags

adleradler-32adler32checksumfletcherfletcher-checksumphpphp-library

### Embed Badge

![Health badge](/badges/luhav-havok-n/health.svg)

```
[![Health](https://phpackages.com/badges/luhav-havok-n/health.svg)](https://phpackages.com/packages/luhav-havok-n)
```

###  Alternatives

[spaze/csp-config

Build Content Security Policy from a config file

143.3k](/packages/spaze-csp-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
