MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / hash

Method hash

src/main/java/com/volmit/adapt/util/IO.java:100–109  ·  view source on GitHub ↗
(String b)

Source from the content-addressed store, hash-verified

98 }
99
100 public static String hash(String b) {
101 try {
102 MessageDigest d = MessageDigest.getInstance("SHA-256");
103 return bytesToHex(d.digest(b.getBytes(StandardCharsets.UTF_8)));
104 } catch (NoSuchAlgorithmException e) {
105 e.printStackTrace();
106 }
107
108 return "¯\\_(ツ)_/¯";
109 }
110
111 public static String hash(File b) {
112 try {

Callers 1

hashCodeMethod · 0.80

Calls 4

bytesToHexMethod · 0.95
fullTransferMethod · 0.95
getInstanceMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected