New major Tab to add: File Utilities
This tools should NOT replace the built-in unix tool. It exists only for usage on systems where the existing tool is not readily available.
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.xml.bind.DatatypeConverter;
public class MD5 {
public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(Files.readAllBytes(Paths.get("Reb1_Rhee.bed")));
byte[] digest = md.digest();
String myHash = DatatypeConverter.printHexBinary(digest).toLowerCase();
System.out.println(myHash);
}
}
New major Tab to add: File Utilities
This tools should NOT replace the built-in unix tool. It exists only for usage on systems where the existing tool is not readily available.
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.xml.bind.DatatypeConverter;
public class MD5 {
public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(Files.readAllBytes(Paths.get("Reb1_Rhee.bed")));
byte[] digest = md.digest();
String myHash = DatatypeConverter.printHexBinary(digest).toLowerCase();
System.out.println(myHash);
}
}