PHPackages                             swisnl/flysystem-encrypted - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. swisnl/flysystem-encrypted

ActiveLibrary[File &amp; Storage](/categories/file-storage)

swisnl/flysystem-encrypted
==========================

Flysystem Adapter Encryption Decorator

2.2.2(2mo ago)39.1k—8.3%11MITPHPPHP ^8.0CI passing

Since Apr 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/swisnl/flysystem-encrypted)[ Packagist](https://packagist.org/packages/swisnl/flysystem-encrypted)[ Docs](https://github.com/swisnl/flysystem-encrypted)[ RSS](/packages/swisnl-flysystem-encrypted/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (14)Versions (11)Used By (1)

Flysystem Encrypted Filesystem Adapter
======================================

[](#flysystem-encrypted-filesystem-adapter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/628b87e1b8a4ee838e67b5a480bd78839325347ac4b2b3160cfa7f439b326ff5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737769736e6c2f666c7973797374656d2d656e637279707465642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/swisnl/flysystem-encrypted)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Buy us a tree](https://camo.githubusercontent.com/cec0a9b35a1c3235bdbe0d13ea8fbd866a23e30280ad6ca27078c1fd4ac1b709/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://plant.treeware.earth/swisnl/flysystem-encrypted)[![Build Status](https://camo.githubusercontent.com/bf68c60686f75ab83a2cb3d9f192a7d6e55cf52abd357f4b172fdbd9cf4ee161/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737769736e6c2f666c7973797374656d2d656e637279707465642f74657374732e796d6c3f6c6162656c3d7465737473266272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/swisnl/flysystem-encrypted/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/816b48e4ce3fe66786ee638c59121b5a1d3a00bf10e0db067472cd57e46e294b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f737769736e6c2f666c7973797374656d2d656e637279707465642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/swisnl/flysystem-encrypted/code-structure)[![Quality Score](https://camo.githubusercontent.com/41dd01fb3ba9789752109f6fd5b9d49db22ce683b4d4c9d682ae8e214e6783e7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f737769736e6c2f666c7973797374656d2d656e637279707465642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/swisnl/flysystem-encrypted)[![Total Downloads](https://camo.githubusercontent.com/cc37ff7614868ce391a0b00a1668ce10537f8f5213c19e2df41882aa7c530938/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737769736e6c2f666c7973797374656d2d656e637279707465642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/swisnl/flysystem-encrypted)[![Made by SWIS](https://camo.githubusercontent.com/ef6bdd6ab8d4f47bceb74dcf558b0915c6b419cbba320096324af0518e43091d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539412538302d6d6164652532306279253230535749532d2532333037333741392e7376673f7374796c653d666c61742d737175617265)](https://www.swis.nl)

This Flysystem adapter is a transparent decorator that encrypts/decrypts files using the [Illuminate Encrypter](https://packagist.org/packages/illuminate/encryption).

Install
-------

[](#install)

Via Composer

```
$ composer require swisnl/flysystem-encrypted
```

N.B. Using Flysystem 1? Please use version [1.x](https://github.com/swisnl/flysystem-encrypted/tree/1.x) of this adapter.

Usage
-----

[](#usage)

```
use Illuminate\Encryption\Encrypter;
use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
use Swis\Flysystem\Encrypted\EncryptedFilesystemAdapter;

// Create the adapter
$localAdapter = new Local('/path/to/root');

// Create the encrypter
$encrypter = new Encrypter('key', 'cipher');

// Decorate the adapter
$adapter = new EncryptedFilesystemAdapter($localAdapter, $encrypter);

// And use that to create the file system
$filesystem = new Filesystem($adapter);
```

Known limitations
-----------------

[](#known-limitations)

1. Encrypted data is — depending on what you encrypt — roughly 30-40% bigger.
2. You can use streams with this adapter, but internally they will always be converted to a string because the entire file contents need to be encrypted/decrypted at once. This requires quite some memory, so this adapter is not recommended for large files.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Jasper Zonneveld](https://github.com/swisnl)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/swisnl/flysystem-encrypted) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

SWIS ❤️ Open Source
-------------------

[](#swis-heart-open-source)

[SWIS](https://www.swis.nl) is a web agency from Leiden, the Netherlands. We love working with open source software.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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

Every ~239 days

Recently: every ~374 days

Total

10

Last Release

60d ago

Major Versions

1.x-dev → 2.0.02022-02-09

PHP version history (4 changes)1.0.0-betaPHP ~7.2

1.0.1PHP ^7.2|^8.0

2.1.0PHP ^7.4|^8.0

2.2.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8734305?v=4)[SWIS](/maintainers/swisnl)[@swisnl](https://github.com/swisnl)

---

Top Contributors

[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (43 commits)")

---

Tags

decoratorencryptionflysystemflysystem-adapterhacktoberfestFlysystemadapterswisnldecoratorencrypted

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/swisnl-flysystem-encrypted/health.svg)

```
[![Health](https://phpackages.com/badges/swisnl-flysystem-encrypted/health.svg)](https://phpackages.com/packages/swisnl-flysystem-encrypted)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[justus/flysystem-onedrive

A flysystem driver for OneDrive that uses the Microsoft Graph API

48104.4k](/packages/justus-flysystem-onedrive)[taffovelikoff/imagekit-adapter

Flysystem adapter for ImageKit.

1421.0k](/packages/taffovelikoff-imagekit-adapter)[jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3

1289.9k1](/packages/jerodev-flysystem-v3-smb-adapter)[quix-labs/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

169.9k](/packages/quix-labs-laravel-supabase-flysystem)

PHPackages © 2026

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