Created
May 30, 2017 11:48
-
-
Save kuba--/0d679f4207303863def5ae7d354ab34f to your computer and use it in GitHub Desktop.
String Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.SecureRandom; | |
import java.math.BigInteger; | |
final class StringGenerator { | |
private SecureRandom random = new SecureRandom(); | |
public String next() { | |
return new BigInteger(128, random).toString(32); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment