You are viewing a single comment's thread. Return to all comments →
JAVA 8
Scanner scan = new Scanner(System.in); String s = scan.next();
MessageDigest md = null; try { md = MessageDigest.getInstance("SHA-256"); } catch (Exception e) { throw new RuntimeException(e); } byte[] digest = md.digest(s.getBytes(StandardCharsets.UTF_8)); String sha256 = DatatypeConverter.printHexBinary(digest).toLowerCase(); System.out.println(sha256);
Seems like cookies are disabled on this browser, please enable them to open this website
Java SHA-256
You are viewing a single comment's thread. Return to all comments →
JAVA 8
Scanner scan = new Scanner(System.in); String s = scan.next();