I'm interested in generating a (secure) random String with the following properties:
- Atleast 1 upper case letter
- Atleast 1 lower case letter
- Atleast 1 digit from 0-9
- Atleast one special char from chars $&@?<>~!%#
The length of string should be from 12-13 digits/chars long.
I know there is a class in Apache commons that can help generate random Strings however there is no option to include special chars.
I'm also aware of some other similar questions on SO however none of them address exactly these requirements.
What is the best way?
I'm using Java.
Thanks
Aucun commentaire:
Enregistrer un commentaire