MCPcopy Create free account
hub / github.com/L1yp/van-app / randomCode

Method randomCode

src/main/java/com/l1yp/util/HexUtil.java:99–106  ·  view source on GitHub ↗
(int count)

Source from the content-addressed store, hash-verified

97 }
98
99 public static String randomCode(int count) {
100 StringBuilder sb = new StringBuilder(count);
101 for (int i = 0; i < count; i++) {
102 int idx = ThreadLocalRandom.current().nextInt(lower_digits.length);
103 sb.append(lower_digits[idx]);
104 }
105 return sb.toString();
106 }
107
108 public static void main(String[] args) throws IOException {
109 ByteBuffer buffer = ByteBuffer.allocate(16);

Callers 1

addMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected