mstaack/flysystem-encryption-adapter

Transparently encrypt and decrypt your content with flysystem

dev-master 2019-02-05 16:54 UTC

This package is auto-updated.

Last update: 2023-02-06 06:31:35 UTC


README

Build Status Total Downloads

Uses halite as a default or implement EncryptionInterface. Also uses a stream filter when requested.

Installation

composer require mstaack/flysystem-encryption-adapter

Usage

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)