MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / bytesToHex

Method bytesToHex

ij/src/main/java/ij/util/Tools.java:515–525  ·  view source on GitHub ↗
(byte[] hash)

Source from the content-addressed store, hash-verified

513 }
514
515 private static String bytesToHex(byte[] hash) {
516 StringBuilder hexString = new StringBuilder(2 * hash.length);
517 for (int i = 0; i < hash.length; i++) {
518 String hex = Integer.toHexString(0xff & hash[i]);
519 if (hex.length() == 1) {
520 hexString.append('0');
521 }
522 hexString.append(hex);
523 }
524 return hexString.toString();
525 }
526
527}

Callers 1

getHashMethod · 0.95

Calls 3

lengthMethod · 0.65
appendMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected