MCPcopy Create free account
hub / github.com/Grashjs/cmms / hashKey

Method hashKey

api/src/main/java/com/grash/utils/Helper.java:423–428  ·  view source on GitHub ↗
(String raw)

Source from the content-addressed store, hash-verified

421 }
422
423 public static String hashKey(String raw) throws NoSuchAlgorithmException {
424 // Use SHA-256
425 MessageDigest digest = MessageDigest.getInstance("SHA-256");
426 byte[] hash = digest.digest(raw.getBytes(StandardCharsets.UTF_8));
427 return Base64.getEncoder().encodeToString(hash);
428 }
429}

Callers 2

doFilterInternalMethod · 0.95
createMethod · 0.95

Calls 1

getBytesMethod · 0.80

Tested by

no test coverage detected