]> git.mxchange.org Git - hub.git/commitdiff
md5() isn't really much better, but it needs to be fast, please help to find somethin...
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jan 2014 21:30:43 +0000 (21:30 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jan 2014 21:30:43 +0000 (21:30 +0000)
application/hub/main/package/class_NetworkPackage.php

index 87404c7c5248207313245fa725f2c3c198410671..fc55db7104fbb6ad0f6d502e4a2a20f9913a71ab 100644 (file)
@@ -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 .