Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
/ polyfill-libsodium Public archive

A polyfill for the transition from libsodium (the extension for PHP < 7.2) to sodium (as bundled with PHP 7.2)

License

Notifications You must be signed in to change notification settings

mollie/polyfill-libsodium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polyfill Libsodium

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

Build Status

The new sodium extension has been accepted and will be distributed with PHP >= 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: https://github.com/jedisct1/libsodium-php

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

This software is licensed under the MIT License

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

About

A polyfill for the transition from libsodium (the extension for PHP < 7.2) to sodium (as bundled with PHP 7.2)

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages