I am trying to convert a String to a SHA1 hash!
This is my code
public static void SHA1(String x) throws NoSuchAlgorithmException
{
MessageDigest sha1 = MessageDigest.getInstance("SHA1");
SHA1 = sha1.digest((x).getBytes());
}
I have a private static byte[] SHA1;
Sadly the output comes out like this
[B@1a758cb
I am trying to make the code as small as possible! Thanks