From: Roland Haeder Date: Tue, 26 May 2015 22:32:48 +0000 (+0200) Subject: Added debug lines. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e60dc66c8e076f2e3f3290f782e1ae13b90973a1;p=hub.git Added debug lines. Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index c0e01cffb..9b474be5e 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -656,6 +656,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R * @return $hash Hash as hex-encoded string */ private function generatePackageHash ($content, $senderId) { + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: extension_scrypt_loaded=' . intval($this->getConfigInstance()->getConfigEntry('extension_scrypt_loaded')) . ' - CALLED!'); + // Is the feature enabled? if ($this->getConfigInstance()->getConfigEntry('extension_scrypt_loaded') === FALSE) { // Feature is not enabled @@ -673,6 +676,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: senderId=' . $senderId . ',content()=' . strlen($content)); $hash = Scrypt::hashScrypt($senderId . ':' . $content . ':' . $this->determineSenderPrivateKeyHash($data)); + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash . ' - EXIT!'); + // Return it return $hash; }