MCPcopy Index your code
hub / github.com/ccxt/ccxt / randomBytes

Method randomBytes

java/lib/src/main/java/io/github/ccxt/Exchange.java:2421–2431  ·  view source on GitHub ↗
(int length)

Source from the content-addressed store, hash-verified

2419 }
2420
2421 public String randomBytes(int length) {
2422
2423 if (length <= 0) {
2424 throw new IllegalArgumentException("length must be greater than 0");
2425 }
2426
2427 byte[] x = new byte[length];
2428 secureRandom.nextBytes(x);
2429
2430 return bytesToHex(x);
2431 }
2432
2433 private String bytesToHex(byte[] bytes) {
2434 StringBuilder sb = new StringBuilder(bytes.length * 2);

Callers 1

createAuthTokenMethod · 0.45

Calls 1

bytesToHexMethod · 0.95

Tested by

no test coverage detected