Note: This function is no longer used. This function generates md5 hash of the input string @param inputString @return md5 hash of the input string
(final String inputString)
| 60 | * @return md5 hash of the input string |
| 61 | */ |
| 62 | public static final String md5(final String inputString) { |
| 63 | final String MD5 = "MD5"; |
| 64 | try { |
| 65 | // Create MD5 Hash |
| 66 | MessageDigest digest = java.security.MessageDigest |
| 67 | .getInstance(MD5); |
| 68 | digest.update(inputString.getBytes()); |
| 69 | byte messageDigest[] = digest.digest(); |
| 70 | |
| 71 | // Create Hex String |
| 72 | StringBuilder hexString = new StringBuilder(); |
| 73 | for (byte aMessageDigest : messageDigest) { |
| 74 | String h = Integer.toHexString(0xFF & aMessageDigest); |
| 75 | while (h.length() < 2) |
| 76 | h = "0" + h; |
| 77 | hexString.append(h); |
| 78 | } |
| 79 | return hexString.toString(); |
| 80 | |
| 81 | } catch (NoSuchAlgorithmException e) { |
| 82 | e.printStackTrace(); |
| 83 | } |
| 84 | return ""; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * |
nothing calls this directly
no outgoing calls
no test coverage detected