https://github.com/mstaack/flysystem-encryption-adapter
Flysystem Encryption Adapter
https://github.com/mstaack/flysystem-encryption-adapter
Last synced: 6 months ago
JSON representation
Flysystem Encryption Adapter
- Host: GitHub
- URL: https://github.com/mstaack/flysystem-encryption-adapter
- Owner: mstaack
- Created: 2015-09-25T09:34:53.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T16:54:28.000Z (over 7 years ago)
- Last Synced: 2025-10-09T17:32:35.157Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Encrypted Flysystem Adapter
[](https://travis-ci.org/mstaack/flysystem-encryption-adapter)
[](https://packagist.org/packages/mstaack/flysystem-encryption-adapter)
Uses `halite` as a default or implement `EncryptionInterface`. Also uses a stream filter when requested.
## Installation
```bash
composer require mstaack/flysystem-encryption-adapter
```
## Usage
```php
use League\Flysystem\Filesystem;
use League\Flysystem\Memory\MemoryAdapter;
use MStaack\Flysystem\Encryption\Encryption;
use MStaack\Flysystem\Encryption\EncryptionAdapterDecorator;
$adapter = new MemoryAdapter();
$encryption = new Encryption($encryptionKey='yournicekey');
$adapterDecorator = new EncryptionAdapterDecorator($adapter, $encryption);
$filesystem = new Filesystem($adapterDecorator)
```