public function initialize(Subject $subject, CallbackHandlerInterface $callbackHandler, MapInterface $sharedState, MapInterface $params)
{
// call the parent method
parent::initialize($subject, $callbackHandler, $sharedState, $params);
// check to see if password hashing has been enabled, if an algorithm is set, check for a format and charset
$this->hashAlgorithm = new String($params->get(ParamKeys::HASH_ALGORITHM));
// query whether or not a hash algorithm has been specified
if ($this->hashAlgorithm != null) {
// initialize the hash encoding to use
if ($params->exists(ParamKeys::HASH_ENCODING)) {
$this->hashEncoding = new String($params->get(ParamKeys::HASH_ENCODING));
} else {
$this->hashEncoding = new String(Util::BASE64_ENCODING);
}
// initialize the hash charset if specified
if ($params->exists(ParamKeys::HASH_CHARSET)) {
$this->hashCharset = new String($params->get(ParamKeys::HASH_CHARSET));
}
}
// query whether or not we should ignor case when comparing passwords
if ($params->exists(ParamKeys::IGNORE_PASSWORD_CASE)) {
$flag = new String($params->get(ParamKeys::IGNORE_PASSWORD_CASE));
$this->ignorePasswordCase = Boolean::valueOf($flag)->booleanValue();
} else {
$this->ignorePasswordCase = false;
}
}