I know there is nextInt, nextDouble, etc for numbers and even a nextBoolean for true or false, but I haven't found anything for Strings with the following:
-
Ability to create a minimum / maximum or even specific longitudes. For instance, create a random string between 6 or 8 characters, or create a random string with 12 characters
-
Ability to specify a schema. For instance, only numbers, only letters, only uppercase letters, only special signs like !@#$%^&, etc
Basically, what I'm trying to create, is a Crunch tool, a pen testing tool able to gererate random passwords, but for Java, using only the JDK (it can be JDK8, but I'm not interested in third party libraries), making use of the maximum amount of available built in tools in my code, just for the sake of not reinventing the wheel. I would like to know the available tools before starting to code.
Some additional notes: I'm not looking for something able to give me everything I want. I just would like to know if there is a function to call to retrieve, for instance, a random char, or a random uppercase char, etc. I have no issues glueing everything together.
Aucun commentaire:
Enregistrer un commentaire