Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java sha256 hex digest

String password = "123456";

MessageDigest md = MessageDigest.getInstance("SHA-256");
byte[]hashInBytes = md.digest(password.getBytes(StandardCharsets.UTF__8));

//bytes to hex
StringBuilder sb = new StringBuilder();
for (byte b : hashInBytes) {
	sb.append(String.format("%02x", b));
}
System.out.println(sb.toString());
Source by www.codeflow.site #
 
PREVIOUS NEXT
Tagged: #java #hex #digest
ADD COMMENT
Topic
Name
5+7 =