]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/package/class_NetworkPackage.php
Changed all true/false to TRUE/FALSE respectively as PHP constants are better than...
[hub.git] / application / hub / main / package / class_NetworkPackage.php
index d7507b03fb6e1b32b7a5422c61df9049cf50686a..df1ff642ae204087d87e3caad946e6769eac2acc 100644 (file)
@@ -560,7 +560,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        private function generatePackageSignature ($content, $senderId) {
                // Hash content and sender id together, use md5() as last algo
-               $hash = md5($this->getCryptoInstance()->hashString($senderId . $content, $this->getPrivateKey(), false));
+               $hash = md5($this->getCryptoInstance()->hashString($senderId . $content, $this->getPrivateKey(), FALSE));
 
                // Encrypt the content again with the hash as a key
                $encryptedContent = $this->getCryptoInstance()->encryptString($content, $hash);
@@ -586,7 +586,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
 
                // Is it the same?
                //$isSignatureValid = 
-               exit(__METHOD__.': signature='.$signature.chr(10).',decodedArray='.print_r($decodedArray,true));
+               exit(__METHOD__.': signature='.$signature.chr(10).',decodedArray='.print_r($decodedArray, TRUE));
        }
 
        /**
@@ -869,7 +869,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $decodedData = $handlerInstance->getNextRawData();
 
                // Very noisy debug message:
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, true));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: decodedData[' . gettype($decodedData) . ']=' . print_r($decodedData, TRUE));
 
                // And push it on our stack
                $this->getStackerInstance()->pushNamed(self::STACKER_NAME_DECODED_INCOMING, $decodedData);
@@ -960,7 +960,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function clearAllStacker () {
                // Call the init method to force re-initialization
-               $this->initStackers(true);
+               $this->initStackers(TRUE);
 
                // Debug message
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: All stacker have been re-initialized.');
@@ -1134,7 +1134,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $messageArray[self::MESSAGE_ARRAY_DATA][self::MESSAGE_ARRAY_TYPE] = $messageArray[self::MESSAGE_ARRAY_TYPE];
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: messageArray=' . print_r($messageArray, true));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __LINE__ . ']: messageArray=' . print_r($messageArray, TRUE));
 
                // Create a handler instance from given message type
                $handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]);