IMMREX7

aku nok ndi : /home/spdtg/www/gomygps/vendor/league/flysystem/src/Util/
File Up :
aku nok ndi : /home/spdtg/www/gomygps/vendor/league/flysystem/src/Util/StreamHasher.php

<?php

namespace League\Flysystem\Util;

class StreamHasher
{
    /**
     * @var string
     */
    private $algo;

    /**
     * StreamHasher constructor.
     *
     * @param string $algo
     */
    public function __construct($algo)
    {
        $this->algo = $algo;
    }

    /**
     * @param resource $resource
     *
     * @return string
     */
    public function hash($resource)
    {
        rewind($resource);
        $context = hash_init($this->algo);
        hash_update_stream($context, $resource);
        fclose($resource);

        return hash_final($context);
    }
}

Copyright © 2021 - 2025 IMMREX7