PHPackages                             internetpixels/sodium-encryption - 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. [Security](/categories/security)
4. /
5. internetpixels/sodium-encryption

ActiveLibrary[Security](/categories/security)

internetpixels/sodium-encryption
================================

Encrypt and decrypt data with this easy to use PHP encryption library

1.0.0(7y ago)53.2k[2 issues](https://github.com/internetpixels/sodium-encryption/issues)PHPPHP &gt;=7.1

Since Jun 15Pushed 7y agoCompare

[ Source](https://github.com/internetpixels/sodium-encryption)[ Packagist](https://packagist.org/packages/internetpixels/sodium-encryption)[ RSS](/packages/internetpixels-sodium-encryption/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Sodium PHP encryption library
=============================

[](#sodium-php-encryption-library)

Protect your data and secure every field in your entities with this tiny encryption library!

This is a open-source library. Please consider a link to this repository when you're actively using it.

[![License](https://camo.githubusercontent.com/cf76db379873b010c163f9cf1b5de4f5730b5a67/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e7376673f763d313032)](https://github.com/internetpixels/csrf-protection)[![Build Status](https://camo.githubusercontent.com/f4f587d33439fb7084ffd3d9c1ac744b627c91e3835a58a2cdbc5ed2493e8bef/68747470733a2f2f7472617669732d63692e6f72672f696e7465726e6574706978656c732f736f6469756d2d656e6372797074696f6e2e737667)](https://travis-ci.org/internetpixels/csrf-protection)[![Maintainability](https://camo.githubusercontent.com/af95d3dc77484f42090aaebde151552fa7ede9a40c7309935a2b24108a653aac/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64306438313761323163613732343334333362332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/internetpixels/sodium-encryption)

Install with composer
---------------------

[](#install-with-composer)

This small encryption/decryption library can be required by using composer. Please use the following command:

```
composer require internetpixels/sodium-encryption

```

### Setup the TokenManager

[](#setup-the-tokenmanager)

You have to set the `secret` and `public` tokens once. Those keys are not allowed to change overtime!

```
