} // END - if
// Make sure the requested element is there
+ // @TODO Wrong hash!!!!
+ /* DEBUG-DIE */ die('decodedData=' . print_r($decodedData, TRUE));
assert(isset($decodedData[self::INDEX_PACKAGE_HASH]));
// There is no DHT entry so, accept the hash from decoded data
*/
private function isPackageHashValid (array $decodedArray) {
// Check validity
- $isHashValid = Scrypt::checkScrypt($decodedArray[self::INDEX_PACKAGE_SENDER] . ':' . $decodedArray[self::INDEX_PACKAGE_CONTENT] . ':' . $this->determineSenderPrivateKeyHash($decodedArray));
+ //* DEBUG-DIE: */ die(__METHOD__ . ': decodedArray=' . print_r($decodedArray, TRUE));
+ $isHashValid = Scrypt::checkScrypt($decodedArray[self::INDEX_PACKAGE_SENDER] . ':' . $decodedArray[self::INDEX_PACKAGE_CONTENT] . ':' . $this->determineSenderPrivateKeyHash($decodedArray), $decodedArray[self::INDEX_PACKAGE_HASH]);
// Return it
- //* DEBUG-DIE: */ die(__METHOD__ . ': isHashValid=' . intval($isHashValid) . chr(10) . ',decodedArray=' . print_r($decodedArray, TRUE));
+ //* DEBUG-DIE: */ die(__METHOD__ . ': isHashValid=' . intval($isHashValid) . ',decodedArray=' . print_r($decodedArray, TRUE));
return $isHashValid;
}