public function doGenerateHash(AbstractData $data, Entity $entity, $passwordField, $password, $newSalt)
    {
        $doGenerateHash = true;
        $id = $entity->get('id');
        if ($id !== null) {
            $oldEntity = $data->get($entity->get('id'));
            $doGenerateHash = $oldEntity->get($passwordField) !== $password || $newSalt;
        }
        return $doGenerateHash;
    }