<?php hash( string $algo, string $data, bool $binary = false, array $options = []): string
<?php $path = str_replace('%hash%', $hash, key($json['provider-includes'])); $provider = $this->httpDownloader->get($protocol . '://repo.packagist.org/'.$path)->getBody(); if (hash('sha256', $provider) !== $hash) { return 'It seems that your proxy is modifying http traffic on the fly'; } } catch (\Exception $e) {
<?php $response = $this->httpDownloader->get($filename, $options); $json = (string) $response->getBody(); if ($sha256 && $sha256 !== hash('sha256', $json)) { if ($this->allowSslDowngrade) { $this->url = str_replace('http://', 'https://', $this->url);
<?php public static function fingerprint($path) { $hash = strtoupper(hash('sha256', Preg::replace('{\s}', '', file_get_contents($path)))); return implode(' ', array( substr($hash, 0, 8),