public function FailedCheckumFilter::accept in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/drupal/php-signify/src/FailedCheckumFilter.php \Drupal\Signify\FailedCheckumFilter::accept()
File
- vendor/
drupal/ php-signify/ src/ FailedCheckumFilter.php, line 19
Class
Namespace
Drupal\SignifyCode
public function accept() {
/** @var \Drupal\Signify\VerifierFileChecksum $checksum */
$checksum = $this
->current();
$hash_file_path = $this->workingDirectory . DIRECTORY_SEPARATOR . $checksum->filename;
$algorithm = strtolower($checksum->algorithm);
$hash = @hash_file($algorithm, $hash_file_path);
return $hash !== $checksum->hex_hash;
}