- private static SecureRandom xRandom = new SecureRandom();
- public static String randomstr(int size) {
- String randomString = new BigInteger(size, xRandom).toString(32);
- return randomString;
- }
- //该片段来自于http://www.codesnippet.cn/detail/191220121070.html
来源: http://www.codesnippet.cn/detail/191220121070.html