// 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);
}
}