]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/registration/class_ShipSimuRegistration.php
Support for cluster added to RNG, hashPassword() finished for better hashes
[shipsimu.git] / application / ship-simu / main / registration / class_ShipSimuRegistration.php
index ff3a45a34a798b39f8d22e3bd582b671b43de3ed..a6639c5688f00013960e4a98054fc32b9c279b7c 100644 (file)
@@ -67,8 +67,12 @@ class ShipSimuRegistration extends BaseRegistration {
                // Check if the password is found in the request
                if ($this->getRequestInstance()->isRequestElementSet($requestKey)) {
                        // So encrypt the password and store it for later usage in
-                       // the request
-                       $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_heler')->hashPassword($this->getRequestInstance()->getRequestElement($requestKey));
+                       // the request:
+                       // 1.: Get the plain password
+                       $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+                       // 2. Get a crypto helper and hash the password
+                       $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_heler')->hashPassword($plainPassword);
+                       // 3. Store the hash back in the request
                        $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
                }
        }