MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / Get_SHA_128

Method Get_SHA_128

src/main/java/utils/Hash.java:53–66  ·  view source on GitHub ↗
(byte[] passwordToHash)

Source from the content-addressed store, hash-verified

51 }
52
53 public static byte[] Get_SHA_128(byte[] passwordToHash) {
54 try {
55 MessageDigest md = MessageDigest.getInstance("Sha-256");
56 md.update(passwordToHash);
57 byte[] bytes = md.digest();
58 byte[] hash_128 = new byte[16];
59 System.arraycopy(bytes,0,hash_128,0,16);
60 return hash_128;
61 }
62 catch (NoSuchAlgorithmException e) {
63 e.printStackTrace();
64 }
65 return null;
66 }
67}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected