From 86d598813ff6b78315f466d57ff021939bdf4d1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 23 Jan 2014 21:30:43 +0000 Subject: [PATCH] md5() isn't really much better, but it needs to be fast, please help to find something that works on 64-bit and 32-bit likewise. Thank you. --- application/hub/main/package/class_NetworkPackage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 87404c7c5..fc55db710 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -306,8 +306,8 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: content[md5]=' . md5($content) . ',sender=' . $this->getSessionId() . ',compressor=' . $this->getCompressorInstance()->getCompressorExtension()); // Create the hash - // @TODO crc32() is very weak, but it needs to be fast - $hash = crc32( + // @TODO md5() is very weak, but it needs to be fast + $hash = md5( $content . self::PACKAGE_CHECKSUM_SEPARATOR . $this->getSessionId() . @@ -380,8 +380,8 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: content[md5]=' . md5($decodedContent[self::PACKAGE_CONTENT_MESSAGE]) . ',sender=' . $sessionId . ',compressor=' . $decodedContent[self::PACKAGE_CONTENT_EXTENSION]); // Create the hash - // @TODO crc32() is very weak, but it needs to be fast - $hash = crc32( + // @TODO md5() is very weak, but it needs to be fast + $hash = md5( $decodedContent[self::PACKAGE_CONTENT_MESSAGE] . self::PACKAGE_CHECKSUM_SEPARATOR . $sessionId . -- 2.39.5