2017 © Pedro Peláez
 

library flysystem-hash

Flysystem plugin for generating a hash value of a given file

image

emgag/flysystem-hash

Flysystem plugin for generating a hash value of a given file

  • Friday, January 5, 2018
  • by emgag
  • Repository
  • 2 Watchers
  • 7 Stars
  • 12,220 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 17 % Grown

The README.md

Flysystem Plugin for generating hash value of file

build Software License Packagist Version, (*1)

NOTE: Plugins were removed in Flysystem 2.0 and thus this library is only available for Flysystem 1.x., (*2)

A plugin for the Flysystem file system abstraction library to generate hash values of a file. See hash_algos() function for supported hash algorithms., (*3)

Tested with Local and WebDav adapters, but as the hash is built directly from the stream resource it should work for all other adapters as well., (*4)

Installation

composer require emgag/flysystem-hash

Usage

use Emgag\Flysystem\Hash\HashPlugin;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem; 

$fs = new Filesystem(new Local(__DIR__));
$fs->addPlugin(new HashPlugin);

// sha256 is default
$sha256 = $fs->hash('file.txt');
$sha256 = $fs->hash('file.txt', 'sha256');
$md5    = $fs->hash('file.txt', 'md5');
$sha1   = $fs->hash('file.txt', 'sha1');

License

flysystem-hash is licensed under the MIT License., (*5)

The Versions

05/01 2018

dev-master

9999999-dev https://github.com/emgag/flysystem-hash

Flysystem plugin for generating a hash value of a given file

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

hash flysystem md5 sha256 sha1

29/09 2015

v1.0.1

1.0.1.0 https://github.com/emgag/flysystem-hash

Flysystem plugin for generating a hash value of a given file

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

hash flysystem md5 sha256 sha1

28/09 2015

v1.0

1.0.0.0 https://github.com/emgag/flysystem-hash

Flysystem plugin for generating a hash value of a given file

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

hash flysystem md5 sha256 sha1