From: Roland Häder Date: Fri, 22 Feb 2013 05:31:56 +0000 (+0000) Subject: Used correct method X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ecad51210a3cead4d1d70cf83f546a8e7cae9523;p=hub.git Used correct method --- diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 897120c88..898f925d7 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -136,7 +136,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria { */ private function generatePrivateKeyAndHash (LocalSearchCriteria $searchInstance) { // Generate a pseudo-random string - $randomString = $this->generateRandomString(255); + $randomString = $this->getCryptoInstance()->randomString(255); // Hash and encrypt the string so we become a node id (also documented as "hub id") $this->setPrivateKey($this->getCryptoInstance()->encryptString($randomString)); @@ -286,7 +286,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria { self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Re-using found node-id: ' . $this->getNodeId() . ''); } else { // Generate a pseudo-random string - $randomString = $this->generateRandomString(255); + $randomString = $this->getCryptoInstance()->randomString(255); // Hash and encrypt the string so we become a node id (also documented as "hub id") $this->setNodeId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString))); diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 5f9111300..3e1b778e6 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -178,7 +178,6 @@ ./inc/classes/main/class_BaseFrameworkSystem.php:494: * @todo SearchableResult and UpdateableResult shall have a super interface to use here ./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data ./inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done -./inc/classes/main/commands/web/class_WebResendLinkCommand.php:67: // @TODO Rewrite this code to make use of generateRandomString() from 'hub' project ./inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done ./inc/classes/main/console/class_ConsoleTools.php:268: * @todo This should be moved out to an external class, e.g. HttpClient ./inc/classes/main/console/class_ConsoleTools.php:269: * @todo Make IP, host name, port and script name configurable