Change to safer hash methods.

This commit is contained in:
James Cole
2020-04-11 06:42:21 +02:00
parent 91deb22a3f
commit 6829003f5e
8 changed files with 15 additions and 12 deletions

View File

@@ -101,8 +101,8 @@ class CacheProperties
{
$content = '';
foreach ($this->properties as $property) {
$content .= json_encode($property);
$content .= json_encode($property, JSON_THROW_ON_ERROR, 512);
}
$this->hash = substr(sha1($content), 0, 16);
$this->hash = substr(hash('sha256', $content), 0, 16);
}
}