* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class ShipSimuRegistration extends BaseRegistration {
+ /**
+ * Hashed password
+ */
+ private $hashedPassword = "";
+
/**
* Private constructor
*
}
/**
- * Encrypt the given request key or throws an exception if the key was not
+ * Encrypt the given request key or throw an exception if the key was not
* found in the request
*
* @param $requestKey Key in request class
* @return void
*/
public function encryptPassword ($requestKey) {
- $this->partialStub(sprintf("requestKey=%s", $requestKey));
+ // 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));
+ $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+ }
}
/**