MCPcopy Create free account
hub / github.com/SeanDragon/protools / random

Method random

security/src/main/java/pro/tools/security/sm/SM2.java:68–74  ·  view source on GitHub ↗

随机数生成器 @param max @return

(BigInteger max)

Source from the content-addressed store, hash-verified

66 * @return
67 */
68 private static BigInteger random(BigInteger max) {
69 BigInteger r = new BigInteger(256, random);
70 while (r.compareTo(max) >= 0) {
71 r = new BigInteger(128, random);
72 }
73 return r;
74 }
75
76 /**
77 * 字节数组拼接

Callers 5

encryptMethod · 0.95
generateKeyPairMethod · 0.95
signMethod · 0.95
keyExchange_1Method · 0.80
keyExchange_2Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected