public function generatePassword()
{
$characterList = $this->getCharacterList()->getCharacters();
$characters = \strlen($characterList);
$password = '';
$length = $this->getLength();
for ($i = 0; $i < $length; ++$i) {
$password .= $characterList[$this->randomInteger(0, $characters - 1)];
}
return $password;
}