password-generator
password-generator copied to clipboard
Cannot set my own special symbols
Hi, I cannot add my own symbols, is it possible someway? I tried to defined own option and parameter to it $generator ->setLength(25) ->setOptionValue(RequirementPasswordGenerator::OPTION_UPPER_CASE, true) ->setOptionValue(RequirementPasswordGenerator::OPTION_LOWER_CASE, true) ->setOptionValue(RequirementPasswordGenerator::OPTION_NUMBERS, true) ->setOption($symbols, array('type' => Option::TYPE_BOOLEAN, 'default' => false)) ->setParameter($symbols, '!@#$%^&*?_~-,.+') ->setOptionValue($symbols, true)
but i allways get Hackzilla\PasswordGenerator\Exception\InvalidOptionException. Is there some way to defined it? I need to generate password with specifical symbols. Thanks
I'm not sure what @symbols contains, but you want to set it like this.
$generator->setParameter(self::PARAMETER_SYMBOLS, '!@$%^&*()<>,.?/[]{}-=_+')
You can find more information in #21