I want to convert a String to a SHA-256 Hash. I am using this code:
String text = "YOLO";
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(text.getBytes("UTF-8"));
System.out.println(hash.toString());
The problem is, when I start the program, it prints
[B@28d93b30
Why is this, and how can solve this?
Thanks in advance,
Fihdi