alextartan/flysystem-libsodium-adapter
最新稳定版本:2.0.1
Composer 安装命令:
composer require alextartan/flysystem-libsodium-adapter
包简介
On-the-fly encrypt and decrypt flysystem files
README 文档
README
Performing on-the-fly client-side encryption for safe storage of files.
On uploads, the content is encrypted using Poly 1305 with a secret key and stored securely on the filesystem.
On downloads, the content is decrypted.
Current build status
Installation
composer require alextartan/flysystem-libsodium-adapter
Usage
use AlexTartan\Flysystem\Adapter\ChunkEncryption\Libsodium;use AlexTartan\Flysystem\Adapter\EncryptionAdapterDecorator; use League\Flysystem\Filesystem; use League\Flysystem\Memory\MemoryAdapter; $adapter = new MemoryAdapter(); $encryption = Libsodium::factory($encryptionKey, 4096); $adapterDecorator = new EncryptionAdapterDecorator( $adapter, $encryption ); $filesystem = new Filesystem($adapterDecorator);
Notice;
Due to how AwsS3 (and probably other remote adapters) handle stream uploads,
I had to change the way this lib worked (versions up to v.1.0.0)
New releases employ a php://temp stream in which the encryption is done
and once that finishes, the stream is sent to writeStream/readStream
Performance wise, it handles ok from what i could see.
Versioning
This library adheres to semver
统计信息
- 总下载量: 25.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-07-23