承接 alextartan/flysystem-libsodium-adapter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

CI codecov Infection MSI Dependabot Status Downloads

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
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-07-23