MCPcopy Create free account
hub / github.com/annmuor/jnode / generate8d

Method generate8d

jnode-core/src/jnode/ftn/FtnTools.java:161–172  ·  view source on GitHub ↗

Генерация 8d-рандома @return

()

Source from the content-addressed store, hash-verified

159 * @return
160 */
161 public static String generate8d() {
162 byte[] digest = new byte[4];
163 for (int i = 0; i < 4; i++) {
164 long a = Math.round(Integer.MAX_VALUE * Math.random());
165 long b = Math.round(Integer.MIN_VALUE * Math.random());
166 long c = a ^ b;
167 byte d = (byte) ((c >> 12) & 0xff);
168 digest[i] = d;
169 }
170 return String.format("%02x%02x%02x%02x", digest[0], digest[1],
171 digest[2], digest[3]);
172 }
173
174 public static String generateTic() {
175 char[] chars = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'h', 'i',

Callers 15

doInstallMethod · 0.95
writeNetmailMethod · 0.95
createZipFileMethod · 0.95
generateEchoBundleMethod · 0.95
packMethod · 0.95
moveToBadMethod · 0.95
writeEchomailMethod · 0.95
getFilePathMethod · 0.95
startMethod · 0.95
handleMethod · 0.95
handleMethod · 0.95
convertToEchomailMethod · 0.95

Calls 2

randomMethod · 0.80
formatMethod · 0.80

Tested by

no test coverage detected