@Test public void md5Hash() throws Exception { assertArrayEquals(TripleDES.md5Hash("ana123"), new byte[]{83, -112, 72, -99, -93, -105, 28, -69, -51, 34, -63, 89, -43, 77, 36, -38, 83, -112, 72, -99, -93, -105, 28, -69}); }
public static byte[] md5Hash(@NotNull final String toHash) { byte[] digest = DigestUtils.md5(toHash.getBytes()); byte[] key = new byte[24]; System.arraycopy(digest, 0, key, 0, 16); System.arraycopy(digest, 0, key, 16, 8); return key; }
TripleDES { public static byte[] md5Hash(@NotNull final String toHash) { byte[] digest = DigestUtils.md5(toHash.getBytes()); byte[] key = new byte[24]; System.arraycopy(digest, 0, key, 0, 16); System.arraycopy(digest, 0, key, 16, 8); return key; } }
TripleDES { public static byte[] md5Hash(@NotNull final String toHash) { byte[] digest = DigestUtils.md5(toHash.getBytes()); byte[] key = new byte[24]; System.arraycopy(digest, 0, key, 0, 16); System.arraycopy(digest, 0, key, 16, 8); return key; }  }
TripleDES { public static byte[] md5Hash(@NotNull final String toHash) { byte[] digest = DigestUtils.md5(toHash.getBytes()); byte[] key = new byte[24]; System.arraycopy(digest, 0, key, 0, 16); System.arraycopy(digest, 0, key, 16, 8); return key; }  static String encryptPassword(@NotNull final String aPlainPass); static byte[] md5Hash(@NotNull final String toHash); }
TripleDES { public static byte[] md5Hash(@NotNull final String toHash) { byte[] digest = DigestUtils.md5(toHash.getBytes()); byte[] key = new byte[24]; System.arraycopy(digest, 0, key, 0, 16); System.arraycopy(digest, 0, key, 16, 8); return key; }  static String encryptPassword(@NotNull final String aPlainPass); static byte[] md5Hash(@NotNull final String toHash);  }