@param string      $hash
@param string|null $context

@return bool
356802
public function finalizeUpload(string $hash, ?string $context = null): bool
    {
        return rename($this->getPath($hash, $context, false), $this->getPath($hash, $context));
    }
629277
public function setHash($hash)
    {
      if(!is_string($hash) || strlen(trim($hash)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid hash, must be a non empty string');

      $this->hash = $hash;
    }
408484
public static function needsRehash($hash, $options = null, $verify = false)
    {
        self::self($verify);

        return self::$driver->needsRehash($hash, $options);
    }
223923
function Crypt_Hash($hash = 'sha1')
    {
        if ( !defined('CRYPT_HASH_MODE') ) {
            switch (true) {
                case extension_loaded('hash'):
                    define('CRYPT_HASH_MODE', CRYPT_HASH_MODE_HASH);
                    break;
                case extension_loaded('mhash'):
                    define('CRYPT_HASH_MODE', CRYPT_HASH_MODE_MHASH);
                    break;
                default:
                    define('CRYPT_HASH_MODE', CRYPT_HASH_MODE_INTERNAL);
            }
        }

        $this->setHash($hash);
    }
1110233
public function isProductInBasket($hash)
    {
        foreach($this->owner->cache as $item) {
            if ($item['hash_product'] == $hash) return true;
        }

        return false;

//        return (bool)$this->find()
//            ->where([
//                'id_user' => $this->idUser,
//                'hash_product' => $hash
//            ])
//            ->count();
    }
905619
public function addChunk(string $hash, string $chunk, ?string $context = null): bool
    {
        $path = $this->getPath($hash, $context, false);
        if (!file_exists($path)) {
            throw new NotFoundHttpException('temporary file not found');
        }

        $file = fopen($path, "a");
        $result = fwrite($file, $chunk);

        fflush($file);
        fclose($file);

        if ($result === false || $result != strlen($chunk)) {
            return false;
        }

        return true;
    }
969658
public function response($response, $context = null)
    {
        $responseMessage = $response->asResponseMessage($context);
        $this->responseMessage($responseMessage);
    }
1209937
protected function volume($hash) {
		foreach ($this->volumes as $id => $v) {
			if (strpos(''.$hash, $id) === 0) {
				return $this->volumes[$id];
			} 
		}
		return false;
	}
704970
public function bind(Context $context)
    {
        if (! isset($context->__UBID)) {
            $context->__UBID = 0;
        }
        $context->__UBID ++;
        
        return spl_object_hash($context) . $context->__UBID;
    }
297959
public function updateStream($context, $handle, $length = -1)
    {
        if (!is_resource($context) || !is_resource($handle)) {
            return false;
        }

        return hash_update_stream($context, $handle, $length);
    }
1060742
protected function warmCache($hash, $variant = null)
    {
        // Warm dimension cache
        $key = $this->getDimensionCacheKey($hash, $variant);
        $resource = $this->getImageResource();
        if ($resource) {
            $result = $this->getResourceDimensions($resource);
            $this->getCache()->set($key, $result);
        }
    }
984304
public function rm($hash) {
		return $this->commandDisabled('rm')
			? array(elFinder::ERROR_ACCESS_DENIED)
			: $this->remove($this->decode($hash));
	}
814777
public function decode($hash)
    {
        $volume = $this->bridge->getVolume($hash);

        /* @var $volume \elFinderVolumeDriver */
        return (!empty($volume)) ? $volume->getPath($hash) : false;
    }
1280324
public static function requiresMigration($hash)
    {
        $version = substr($hash, 0, 8);

        if ($version == PBKDF2::PREFIX) { // salted PBKDF2, let the responsible class decide
            return PBKDF2::requiresMigration($hash);
        } else { // everything else
            return true;
        }
    }
861544
public static function requiresMigration($hash)
    {
        $length = self::extractSaltlength($hash);
        $iterations = self::extractIterations($hash);
        $keylength = strlen(base64_decode(self::extractHash($hash)));

        if ($length !== self::SALT_LENGTH || $iterations !== self::ITERATIONS || $keylength !== self::KEY_LENGTH) {
            return true;
        } else {
            return false;
        }
    }
1052262
public function forceExpiry($hash)
    {
        if (Symphony::Log()) {
            Symphony::Log()->pushDeprecateWarningToLog('Cacheable::forceExpiry()', 'Cacheable::delete()');
        }
        return $this->delete($hash);
    }
733780
public function hashExists($hash) 
    {
        $data = $this->getPasswordRequestData($hash);
        $h = '';
        foreach($data as $val) 
        {
            $h = $val->rh_login;
            //echo $h;
        }
        
        if(!empty($h)) {
            return true;
        }

        return false;   
    }