PHPackages                             stidges/laravel-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. stidges/laravel-sodium-encryption

ActiveLibrary[Security](/categories/security)

stidges/laravel-sodium-encryption
=================================

A Sodium based encrypter class for Laravel

1.0.0(6y ago)4541MITPHPPHP &gt;=7.2

Since May 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/stidges/laravel-sodium-encryption)[ Packagist](https://packagist.org/packages/stidges/laravel-sodium-encryption)[ Docs](https://github.com/stidges/laravel-sodium-encryption)[ RSS](/packages/stidges-laravel-sodium-encryption/feed)WikiDiscussions master Synced today

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

Laravel Sodium Encryption
=========================

[](#laravel-sodium-encryption)

[![Latest Version on Packagist](https://camo.githubusercontent.com/728f80eb3963d44c20ac08e8151735e17ee28df472b440a694f59ba14053e9c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737469646765732f6c61726176656c2d736f6469756d2d656e6372797074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stidges/laravel-sodium-encryption)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1e92ebabdc0ef4f0cab0c120526ccacdb82db94c33bbca172b88cfca0a7dc8c7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f737469646765732f6c61726176656c2d736f6469756d2d656e6372797074696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/stidges/laravel-sodium-encryption)[![Coverage Status](https://camo.githubusercontent.com/7072c4d2fc39586a2e0338ae7f4276b1f7b0010291e6cd2bff69733da572e2f5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f737469646765732f6c61726176656c2d736f6469756d2d656e6372797074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/stidges/laravel-sodium-encryption/code-structure)[![Quality Score](https://camo.githubusercontent.com/0d03f955ec1dadda4e2b76904ae8327d659224cfe824f2efb34049ffa39e3b5b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f737469646765732f6c61726176656c2d736f6469756d2d656e6372797074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/stidges/laravel-sodium-encryption)[![Total Downloads](https://camo.githubusercontent.com/ced53df5a7110b019999c13c43461a560b5506dd6fb37621969f79c5c9002129/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737469646765732f6c61726176656c2d736f6469756d2d656e6372797074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stidges/laravel-sodium-encryption)

A [Sodium](https://www.php.net/manual/en/book.sodium.php) based Encrypter class for Laravel, with the same API as the built-in Encrypter class.

Install
-------

[](#install)

You can install the package via Composer:

```
$ composer require stidges/laravel-sodium-encryption
```

The service provider is registered through auto-discovery, so you can start using it out of the box!

Usage
-----

[](#usage)

You can resolve the Encrypter class from Laravel's [service container](https://laravel.com/docs/5.8/container):

```
use Stidges\LaravelSodiumEncryption\Encrypter;

$encrypter = app(Encrypter::class);
// or
$encrypter = app('encrypter.sodium');
```

The API is the same as Laravel's built-in Encrypter class, so please [review the official Laravel documentation](https://laravel.com/docs/5.8/encryption) on how to use it.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Stidges](https://github.com/stidges)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

2540d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d3026e6eab9c0c75c7315cd4b8ea41d1ab9e0b7665a1f9f9396e2f1f716deba?d=identicon)[stidges](/maintainers/stidges)

---

Top Contributors

[![stidges](https://avatars.githubusercontent.com/u/4399967?v=4)](https://github.com/stidges "stidges (2 commits)")

---

Tags

encryptionlaravelphpsecuritysodiumlaravelencryptionlibsodiumsodiumencrypter

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/stidges-laravel-sodium-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/stidges-laravel-sodium-encryption/health.svg)](https://phpackages.com/packages/stidges-laravel-sodium-encryption)
```

###  Alternatives

[sbamtr/laravel-source-encrypter

Laravel Source Encrypter

58545.6k](/packages/sbamtr-laravel-source-encrypter)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)

PHPackages © 2026

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