/** * get md5. * * @param is input stream. * @return MD5 byte array. */ public static byte[] getMD5(InputStream is) throws IOException { return getMD5(is, 1024 * 8); }
/** * get md5. * * @param is input stream. * @return MD5 byte array. */ public static byte[] getMD5(InputStream is) throws IOException { return getMD5(is, 1024 * 8); }
/** * get md5. * * @param str input string. * @return MD5 byte array. */ public static byte[] getMD5(String str) { return getMD5(str.getBytes()); }
/** * get md5. * * @param str input string. * @return MD5 byte array. */ public static byte[] getMD5(String str) { return getMD5(str.getBytes()); }
/** * get md5. * * @param file file source. * @return MD5 byte array. */ public static byte[] getMD5(File file) throws IOException { InputStream is = new FileInputStream(file); try { return getMD5(is); } finally { is.close(); } }
/** * get md5. * * @param file file source. * @return MD5 byte array. */ public static byte[] getMD5(File file) throws IOException { InputStream is = new FileInputStream(file); try { return getMD5(is); } finally { is.close(); } }
/** * get md5. * * @param is input stream. * @return MD5 byte array. */ public static byte[] getMD5(InputStream is) throws IOException { return getMD5(is, 1024 * 8); }
/** * get md5. * * @param is input stream. * @return MD5 byte array. */ public static byte[] getMD5(InputStream is) throws IOException { return getMD5(is, 1024 * 8); }
/** * get md5. * * @param str input string. * @return MD5 byte array. */ public static byte[] getMD5(String str) { return getMD5(str.getBytes()); }
/** * get md5. * * @param str input string. * @return MD5 byte array. */ public static byte[] getMD5(String str) { return getMD5(str.getBytes()); }
/** * get md5. * * @param file file source. * @return MD5 byte array. */ public static byte[] getMD5(File file) throws IOException { InputStream is = new FileInputStream(file); try { return getMD5(is); } finally { is.close(); } }
/** * get md5. * * @param file file source. * @return MD5 byte array. */ public static byte[] getMD5(File file) throws IOException { InputStream is = new FileInputStream(file); try { return getMD5(is); } finally { is.close(); } }