MCPcopy Create free account
hub / github.com/annmuor/jnode / md5

Method md5

jnode-core/src/jnode/ftn/FtnTools.java:1641–1653  ·  view source on GitHub ↗
(String protocolPassword)

Source from the content-addressed store, hash-verified

1639 }
1640
1641 public static String md5(String protocolPassword) {
1642 MessageDigest mdEnc;
1643 try {
1644 mdEnc = MessageDigest.getInstance("MD5");
1645 mdEnc.update(protocolPassword.getBytes(), 0,
1646 protocolPassword.length());
1647 String md5 = new BigInteger(1, mdEnc.digest()).toString(16);
1648 return "MD5-" + md5;
1649 } catch (NoSuchAlgorithmException e) {
1650 return "PLAIN-" + protocolPassword;
1651 }
1652
1653 }
1654
1655 public static byte[] objectToBytes(Object object) {
1656 ByteArrayOutputStream bos = new ByteArrayOutputStream();

Callers 3

startMethod · 0.95
handleMethod · 0.95
handleMethod · 0.95

Calls 4

getInstanceMethod · 0.80
updateMethod · 0.80
getBytesMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected