PHPackages                             czarpino/php-crockford32 - 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. czarpino/php-crockford32

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

czarpino/php-crockford32
========================

PHP implementation for Douglas Crockford's Base32 notation

0.1.3(1y ago)04MITPHPPHP &gt;=8.3.0

Since Mar 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/czarpino/php-crockford32)[ Packagist](https://packagist.org/packages/czarpino/php-crockford32)[ RSS](/packages/czarpino-php-crockford32/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Crockford Base32 encoding for PHP
=================================

[](#crockford-base32-encoding-for-php)

A simple and faithful implementation of Douglas Crockford's Base32 encoding in PHP as specified in . Supports encoding and decoding of up to 60-bit integers.

Usage
-----

[](#usage)

Encode and decode integers from 0 up to `1152921504606846975`(largest 60-bit). The full 60-65-bit range is not fully supported in a 64-bit system. The same applies to 30-35-bit range on a 32-bit system.

```
use Czarpino\PhpCrockford32\CrockfordBase32;

$crockfordBase32 = new CrockfordBase32();
$encoded = $crockfordBase32->encode(1152921504606846975); // ZZZZZZZZZZZZ
$decoded = $crockfordBase32->decode('ZZZZZZZZZZZZ');      // 1152921504606846975
```

### Encoding with Check Symbol

[](#encoding-with-check-symbol)

```
use Czarpino\PhpCrockford32\CrockfordBase32;

$crockfordBase32 = new CrockfordBase32();
$encoded = $crockfordBase32->encode(1152921504606846975);
$checksum = $crockfordBase32->checksum($number);
$encodedWithCheckSum = $encoded . $checksum;
```

### Decoding with Check Symbol

[](#decoding-with-check-symbol)

```
use Czarpino\PhpCrockford32\CrockfordBase32;

$encodedWithCheckSum = 'ZZZZZZZZZZZZ9';
$encoded = substr($encodedWithCheckSum, 0, -1);
$checksum = substr($encodedWithCheckSum, -1);

$crockfordBase32 = new CrockfordBase32();
$decoded = $crockfordBase32->decode($encoded);
$isValid = $checksum === $crockfordBase32->checksum($decoded);
```

Installation
------------

[](#installation)

```
composer require czarpino/php-crockford32
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance45

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

432d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c33e12ee283d11bc213374401940c15226c0a5727ac56a597beddbe5b5e4b2c?d=identicon)[czarpino](/maintainers/czarpino)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/czarpino-php-crockford32/health.svg)

```
[![Health](https://phpackages.com/badges/czarpino-php-crockford32/health.svg)](https://phpackages.com/packages/czarpino-php-crockford32)
```

PHPackages © 2026

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