Issue #2546680 by catch: Use hash('crc32b') not crc32()

8.0.x
Alex Pott 2015-08-06 15:40:29 +01:00
parent 4710b0971f
commit 3f1ba54d7b
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class ConfigSchemaChecker implements EventSubscriberInterface {
$name = $saved_config->getName();
$data = $saved_config->get();
$checksum = crc32(serialize($data));
$checksum = hash('crc32b', serialize($data));
$exceptions = array(
// Following are used to test lack of or partial schema. Where partial
// schema is provided, that is explicitly tested in specific tests.

View File

@ -465,7 +465,7 @@ class EntityViewBuilder extends EntityHandlerBase implements EntityHandlerInterf
// series of fields individually for cases such as views tables.
$entity_type_id = $entity->getEntityTypeId();
$bundle = $entity->bundle();
$key = $entity_type_id . ':' . $bundle . ':' . $field_name . ':' . crc32(serialize($display_options));
$key = $entity_type_id . ':' . $bundle . ':' . $field_name . ':' . hash('crc32b', serialize($display_options));
if (!isset($this->singleFieldDisplays[$key])) {
$this->singleFieldDisplays[$key] = EntityViewDisplay::create(array(
'targetEntityType' => $entity_type_id,

View File

@ -277,7 +277,7 @@ class TypedDataManager extends DefaultPluginManager {
if ($settings = $root_definition->getSettings()) {
// Hash the settings into a string. crc32 is the fastest way to hash
// something for non-cryptographic purposes.
$parts[] = crc32(serialize($settings));
$parts[] = hash('crc32b', serialize($settings));
}
// Property path for the requested data object. When creating a list item,
// use 0 in the key as all items look the same.