PHPackages                             mollie/polyfill-libsodium - 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. mollie/polyfill-libsodium

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

mollie/polyfill-libsodium
=========================

A polyfill package to transition from the libsodium php extension to the sodium extension. Which is included in PHP 7.2

v1.1.1(8y ago)14701.6k—9.3%2[1 issues](https://github.com/mollie/polyfill-libsodium/issues)1MITPHPPHP &gt;=7.0.0

Since Sep 12Pushed 3y ago10 watchersCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (1)

Polyfill Libsodium
==================

[](#polyfill-libsodium)

A simple Polyfill for giving libsodium compatibility when having sodium installed.

[![Build Status](https://camo.githubusercontent.com/fc77198693e1cea7acd171503b246d467fd0ac380c037c49a27b653bba3257bd/68747470733a2f2f7472617669732d63692e6f72672f6d6f6c6c69652f706f6c7966696c6c2d6c6962736f6469756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mollie/polyfill-libsodium)

The new sodium extension has been accepted and will be distributed with PHP &gt;= 7.2.
This will have a few breaking changes:

- No more `\Sodium\` namespace. Everything must be in the global namespace.
- The extension will be renamed to `sodium`.
- `\Sodium\randombytes_buf()` and `\Sodium\randombytes_random16()` have been removed.

So the current namespaced functions will not work anymore. So we created a polyfill for this.

Reference:

Installation
============

[](#installation)

**Using Composer:**

The easiest way to install is to require the polyfill-libsodium library with Composer:

```
composer require mollie/polyfill-libsodium
```

After installation of the package the bootstrap.php file will be autoloaded.

**Manual installation:**
Checkout or download all the files and include them manually into your project.

Include the bootstrap file in your project:

```
require 'vendor/mollie/polyfill-libsodium/bootstrap.php';
```

License
=======

[](#license)

This software is licensed under the [MIT License](LICENSE)

Copyright (c) 2017-2018, Mollie B.V.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Every ~66 days

Total

3

Last Release

3038d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23d4c374cd27da6bed534538eb3514a06d2c15485e9d63a8991b277909ecfca8?d=identicon)[willemmollie](/maintainers/willemmollie)

![](https://www.gravatar.com/avatar/0db6d714561c942dd2d7f9f97bd7543886d7bfdd61372b594b2312850fd99f2c?d=identicon)[molops](/maintainers/molops)

---

Top Contributors

[![AnhNhan](https://avatars.githubusercontent.com/u/3199392?v=4)](https://github.com/AnhNhan "AnhNhan (1 commits)")[![vernondegoede](https://avatars.githubusercontent.com/u/2484832?v=4)](https://github.com/vernondegoede "vernondegoede (1 commits)")

### Embed Badge

![Health badge](/badges/mollie-polyfill-libsodium/health.svg)

```
[![Health](https://phpackages.com/badges/mollie-polyfill-libsodium/health.svg)](https://phpackages.com/packages/mollie-polyfill-libsodium)
```

PHPackages © 2026

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