PHP Classes

PHP Sodium Compat: Cryptographic functions of libsodium in pure PHP

Recommend this page to a friend!
  Info   View files Documentation   View files View files (161)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-05-22 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 155 This week: 1All time: 8,979 This week: 114Up
Version License PHP version Categories
sodium-compat 1.5.30Custom (specified...5.2.4PHP 5, Cryptography, Security
Description 

Authors

Paragon Initiative Enterprises
Frank Denis


Contributor

This package provides cryptographic functions of libsodium in pure PHP.

It is a polyfill library for ext/sodium written as pure PHP classes that works since PHP 5.2.4.

The libsodium extension provides classes to generate random data, secret key and public key cryptography including X25519 and Ed25519, hashing, etc..

Innovation Award
PHP Programming Innovation award nominee
January 2017
Number 8
libSodium is cryptography library for which there is a PHP extension. It provides encryption, hashing and verification functions to PHP applications.

It is a simpler and actively supported library that provides means to perform cryptography actions without having to learn too much about cyphers.

This package provides a pure PHP polyfill implementation of libsodium, so it works even when the libsodium extension is not available.

Manuel Lemos
Picture of Scott Arciszewski
  Performance   Level  
Name: Scott Arciszewski <contact>
Classes: 36 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 28x

Winner: 1x

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagedist (2 files)
Files folder imagelib (7 files)
Files folder imagenamespaced (3 files, 1 directory)
Files folder imagesrc (5 files, 3 directories)
Files folder imagetests (8 files, 2 directories)
Accessible without login Plain text file appveyor.yml Data Auxiliary data
Accessible without login Plain text file autoload-fast.php Aux. Auxiliary script
Accessible without login Plain text file autoload-pedantic.php Aux. Auxiliary script
Accessible without login Plain text file autoload-php7.php Aux. Auxiliary script
Accessible without login Plain text file autoload-phpunit.php Aux. Auxiliary script
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file build-phar.sh Data Auxiliary data
Accessible without login Plain text file composer-php52.json Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon.dist Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file psalm-above-3.xml Data Auxiliary data
Accessible without login Plain text file psalm-below-3.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (2 files)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file ci.yml Data Auxiliary data
  Accessible without login Plain text file psalm.yml Data Auxiliary data

  Files folder image Files  /  dist  
File Role Description
  Accessible without login Plain text file box.json Data Auxiliary data
  Accessible without login Plain text file Makefile Data Auxiliary data

  Files folder image Files  /  lib  
File Role Description
  Accessible without login Plain text file constants.php Aux. Auxiliary script
  Accessible without login Plain text file namespaced.php Aux. Auxiliary script
  Accessible without login Plain text file php72compat.php Aux. Auxiliary script
  Accessible without login Plain text file php72compat_const.php Aux. Auxiliary script
  Accessible without login Plain text file ristretto255.php Aux. Auxiliary script
  Accessible without login Plain text file sodium_compat.php Aux. Auxiliary script
  Accessible without login Plain text file stream-xchacha20.php Aux. Auxiliary script

  Files folder image Files  /  namespaced  
File Role Description
Files folder imageCore (13 files, 3 directories)
  Accessible without login Plain text file Compat.php Class Class source
  Accessible without login Plain text file Crypto.php Class Class source
  Accessible without login Plain text file File.php Class Class source

  Files folder image Files  /  namespaced  /  Core  
File Role Description
Files folder imageChaCha20 (2 files)
Files folder imageCurve25519 (2 files, 1 directory)
Files folder imagePoly1305 (1 file)
  Accessible without login Plain text file BLAKE2b.php Class Class source
  Accessible without login Plain text file ChaCha20.php Class Class source
  Accessible without login Plain text file Curve25519.php Class Class source
  Accessible without login Plain text file Ed25519.php Class Class source
  Accessible without login Plain text file HChaCha20.php Class Class source
  Accessible without login Plain text file HSalsa20.php Class Class source
  Accessible without login Plain text file Poly1305.php Class Class source
  Accessible without login Plain text file Salsa20.php Class Class source
  Accessible without login Plain text file SipHash.php Class Class source
  Accessible without login Plain text file Util.php Class Class source
  Accessible without login Plain text file X25519.php Class Class source
  Accessible without login Plain text file XChaCha20.php Class Class source
  Accessible without login Plain text file Xsalsa20.php Class Class source

  Files folder image Files  /  namespaced  /  Core  /  ChaCha20  
File Role Description
  Accessible without login Plain text file Ctx.php Class Class source
  Accessible without login Plain text file IetfCtx.php Class Class source

  Files folder image Files  /  namespaced  /  Core  /  Curve25519  
File Role Description
Files folder imageGe (5 files)
  Accessible without login Plain text file Fe.php Class Class source
  Accessible without login Plain text file H.php Class Class source

  Files folder image Files  /  namespaced  /  Core  /  Curve25519  /  Ge  
File Role Description
  Accessible without login Plain text file Cached.php Class Class source
  Accessible without login Plain text file P1p1.php Class Class source
  Accessible without login Plain text file P2.php Class Class source
  Accessible without login Plain text file P3.php Class Class source
  Accessible without login Plain text file Precomp.php Class Class source

  Files folder image Files  /  namespaced  /  Core  /  Poly1305  
File Role Description
  Accessible without login Plain text file State.php Class Class source

  Files folder image Files  /  src  
File Role Description
Files folder imageCore (14 files, 5 directories)
Files folder imageCore32 (15 files, 4 directories)
Files folder imagePHP52 (1 file)
  Accessible without login Plain text file Compat.php Class Class source
  Accessible without login Plain text file Crypto.php Class Class source
  Accessible without login Plain text file Crypto32.php Class Class source
  Accessible without login Plain text file File.php Class Class source
  Accessible without login Plain text file SodiumException.php Class Class source

  Files folder image Files  /  src  /  Core  
File Role Description
Files folder imageBase64 (2 files)
Files folder imageChaCha20 (2 files)
Files folder imageCurve25519 (3 files, 1 directory)
Files folder imagePoly1305 (1 file)
Files folder imageSecretStream (1 file)
  Accessible without login Plain text file BLAKE2b.php Class Class source
  Accessible without login Plain text file ChaCha20.php Class Class source
  Accessible without login Plain text file Curve25519.php Class Class source
  Accessible without login Plain text file Ed25519.php Class Class source
  Accessible without login Plain text file HChaCha20.php Class Class source
  Accessible without login Plain text file HSalsa20.php Class Class source
  Accessible without login Plain text file Poly1305.php Class Class source
  Accessible without login Plain text file Ristretto255.php Class Class source
  Accessible without login Plain text file Salsa20.php Class Class source
  Accessible without login Plain text file SipHash.php Class Class source
  Accessible without login Plain text file Util.php Class Class source
  Accessible without login Plain text file X25519.php Class Class source
  Accessible without login Plain text file XChaCha20.php Class Class source
  Accessible without login Plain text file XSalsa20.php Class Class source

  Files folder image Files  /  src  /  Core  /  Base64  
File Role Description
  Accessible without login Plain text file Original.php Class Class source
  Accessible without login Plain text file UrlSafe.php Class Class source

  Files folder image Files  /  src  /  Core  /  ChaCha20  
File Role Description
  Accessible without login Plain text file Ctx.php Class Class source
  Accessible without login Plain text file IetfCtx.php Class Class source

  Files folder image Files  /  src  /  Core  /  Curve25519  
File Role Description
Files folder imageGe (5 files)
  Accessible without login Plain text file Fe.php Class Class source
  Accessible without login Plain text file H.php Class Class source
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  /  Core  /  Curve25519  /  Ge  
File Role Description
  Accessible without login Plain text file Cached.php Class Class source
  Accessible without login Plain text file P1p1.php Class Class source
  Accessible without login Plain text file P2.php Class Class source
  Accessible without login Plain text file P3.php Class Class source
  Accessible without login Plain text file Precomp.php Class Class source

  Files folder image Files  /  src  /  Core  /  Poly1305  
File Role Description
  Accessible without login Plain text file State.php Class Class source

  Files folder image Files  /  src  /  Core  /  SecretStream  
File Role Description
  Accessible without login Plain text file State.php Class Class source

  Files folder image Files  /  src  /  Core32  
File Role Description
Files folder imageChaCha20 (2 files)
Files folder imageCurve25519 (3 files, 1 directory)
Files folder imagePoly1305 (1 file)
Files folder imageSecretStream (1 file)
  Accessible without login Plain text file BLAKE2b.php Class Class source
  Accessible without login Plain text file ChaCha20.php Class Class source
  Accessible without login Plain text file Curve25519.php Class Class source
  Accessible without login Plain text file Ed25519.php Class Class source
  Accessible without login Plain text file HChaCha20.php Class Class source
  Accessible without login Plain text file HSalsa20.php Class Class source
  Accessible without login Plain text file Int32.php Class Class source
  Accessible without login Plain text file Int64.php Class Class source
  Accessible without login Plain text file Poly1305.php Class Class source
  Accessible without login Plain text file Salsa20.php Class Class source
  Accessible without login Plain text file SipHash.php Class Class source
  Accessible without login Plain text file Util.php Class Class source
  Accessible without login Plain text file X25519.php Class Class source
  Accessible without login Plain text file XChaCha20.php Class Class source
  Accessible without login Plain text file XSalsa20.php Class Class source

  Files folder image Files  /  src  /  Core32  /  ChaCha20  
File Role Description
  Accessible without login Plain text file Ctx.php Class Class source
  Accessible without login Plain text file IetfCtx.php Class Class source

  Files folder image Files  /  src  /  Core32  /  Curve25519  
File Role Description
Files folder imageGe (5 files)
  Accessible without login Plain text file Fe.php Class Class source
  Accessible without login Plain text file H.php Class Class source
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  /  Core32  /  Curve25519  /  Ge  
File Role Description
  Accessible without login Plain text file Cached.php Class Class source
  Accessible without login Plain text file P1p1.php Class Class source
  Accessible without login Plain text file P2.php Class Class source
  Accessible without login Plain text file P3.php Class Class source
  Accessible without login Plain text file Precomp.php Class Class source

  Files folder image Files  /  src  /  Core32  /  Poly1305  
File Role Description
  Accessible without login Plain text file State.php Class Class source

  Files folder image Files  /  src  /  Core32  /  SecretStream  
File Role Description
  Accessible without login Plain text file State.php Class Class source

  Files folder image Files  /  src  /  PHP52  
File Role Description
  Accessible without login Plain text file SplFixedArray.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imagecompat (6 files)
Files folder imageunit (30 files, 1 directory)
  Accessible without login Plain text file fix-php52.sh Data Auxiliary data
  Accessible without login Plain text file phpunit-shim.php Class Class source
  Accessible without login Plain text file polyfill_test.php Aux. Auxiliary script
  Accessible without login Plain text file polyfill_test.sh Data Auxiliary data
  Accessible without login Plain text file travis-php52.sh Data Auxiliary data
  Accessible without login Plain text file travis.sh Data Auxiliary data
  Accessible without login Plain text file windows-test.bat Data Auxiliary data
  Accessible without login Plain text file Windows32Test.php Class Class source

  Files folder image Files  /  tests  /  compat  
File Role Description
  Accessible without login Plain text file FileCompatTest.php Class Class source
  Accessible without login Plain text file NamespacedTest.php Class Class source
  Accessible without login Plain text file PedanticTest.php Class Class source
  Accessible without login Plain text file PHP72Test.php Class Class source
  Accessible without login Plain text file Ristretto255CompatTest.php Class Class source
  Accessible without login Plain text file SodiumCompatTest.php Class Class source

  Files folder image Files  /  tests  /  unit  
File Role Description
Files folder imagewycheproof (4 files)
  Accessible without login Plain text file Aes256GcmTest.php Class Class source
  Accessible without login Plain text file Blake2bTest.php Class Class source
  Accessible without login Plain text file BoxSealTest.php Class Class source
  Accessible without login Plain text file ChaCha20Test.php Class Class source
  Accessible without login Plain text file CompatTest.php Class Class source
  Accessible without login Plain text file CryptoTest.php Class Class source
  Accessible without login Plain text file Curve25519Test.php Class Class source
  Accessible without login Plain text file Ed25519Test.php Class Class source
  Accessible without login Plain text file ExceptionTest.php Class Class source
  Accessible without login Plain text file FileTest.php Class Class source
  Accessible without login Plain text file HChaCha20Test.php Class Class source
  Accessible without login Plain text file HexTest.php Class Class source
  Accessible without login Plain text file HSalsa20Test.php Class Class source
  Accessible without login Plain text file Int32FastTest.php Class Class source
  Accessible without login Plain text file Int32Test.php Class Class source
  Accessible without login Plain text file Int64FastTest.php Class Class source
  Accessible without login Plain text file Int64Test.php Class Class source
  Accessible without login Plain text file KeyConversionTest.php Class Class source
  Accessible without login Plain text file KeygenTest.php Class Class source
  Accessible without login Plain text file Poly1305Test.php Class Class source
  Accessible without login Plain text file Ristretto255Test.php Class Class source
  Accessible without login Plain text file Salsa20Test.php Class Class source
  Accessible without login Plain text file SecretStreamTest.php Class Class source
  Accessible without login Plain text file SipHashTest.php Class Class source
  Accessible without login Plain text file StreamTest.php Class Class source
  Accessible without login Plain text file UtilTest.php Class Class source
  Accessible without login Plain text file WycheproofTest.php Class Class source
  Accessible without login Plain text file X25519Test.php Class Class source
  Accessible without login Plain text file XChaCha20Test.php Class Class source
  Accessible without login Plain text file XSalsa20Test.php Class Class source

  Files folder image Files  /  tests  /  unit  /  wycheproof  
File Role Description
  Accessible without login Plain text file chacha20_poly1305_test.json Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file x25519_test.json Data Auxiliary data
  Accessible without login Plain text file xchacha20_poly1305_test.json Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:155
This week:1
All time:8,979
This week:114Up