MCPcopy Create free account
hub / github.com/diyhi/bbs / getUUID22

Method getUUID22

src/main/java/cms/utils/UUIDUtil.java:14–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12public class UUIDUtil {
13
14 public static String getUUID22() {
15 UUID uuid = UUID.randomUUID();
16 StringBuilder sb = new StringBuilder();
17 sb.append(digits(uuid.getMostSignificantBits() >> 32, 8));
18 sb.append(digits(uuid.getMostSignificantBits() >> 16, 4));
19 sb.append(digits(uuid.getMostSignificantBits(), 4));
20 sb.append(digits(uuid.getLeastSignificantBits() >> 48, 4));
21 sb.append(digits(uuid.getLeastSignificantBits(), 12));
22 return sb.toString();
23 }
24
25 public static String getUUID32() {
26 String uuid = UUID.randomUUID().toString();

Callers 5

filePackMethod · 0.95
pullFollowMethod · 0.95
addUserMethod · 0.95
createWeiXinUserInfoMethod · 0.95
registerMethod · 0.95

Calls 2

digitsMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected