VWOUtils { @Nullable public static String toMD5Hash(String message) { try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(message.getBytes()); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte b : digest) { builder.append(String.format("%02x", b & 0xff)); } return builder.toString(); } catch (NoSuchAlgorithmException exception) { VWOLog.e(VWOLog.CONFIG_LOGS, "Unable to generate MD5 Hash", exception, true, true); } return null; }  static boolean isValidVwoAppKey(String appKey); static String getDeviceUUID(VWOPreference vwoPreference); static String androidVersion(); static boolean isTablet(@NonNull Context context); static int applicationVersion(Context context); static double getRandomNumber(); static boolean checkForInternetPermissions(Context context); static Calendar getCalendar(); static boolean checkIfClassExists(String className); static String getDeviceName(); static boolean isApplicationDebuggable(@NonNull Context context); static int getScreenWidth(); static int getScreenHeight(); static double getScale(Context context); static String getDeviceCountryCode(Context context); @Nullable static String toMD5Hash(String message);  }
@Test public void toMD5HashTest() { Assert.assertEquals("b6a5706e37a909488da39f9ec842a22c", VWOUtils.toMD5Hash("amandeep.anguralla@wingify.com")); Assert.assertNotSame("b6a5706e37a909488da39f9ec842a22c", VWOUtils.toMD5Hash("Amandeep.anguralla@wingify.com")); }