public class HashUtils extends Object
| Constructor and Description |
|---|
HashUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
bytesToHexString(byte[] bytes)
Convert a byte array into a hex string.
|
static byte[] |
copyAndGetHash(InputStream is,
OutputStream os) |
static byte[] |
hashFile(File file) |
static byte[] |
hexStringToByteArray(String s)
Convert a hex string into a byte[].
|
public static byte[] hashFile(File file) throws IOException
IOExceptionpublic static byte[] copyAndGetHash(InputStream is, OutputStream os) throws IOException
IOExceptionpublic static String bytesToHexString(byte[] bytes)
bytes - the bytespublic static byte[] hexStringToByteArray(String s)
s - the stringCopyright © 2014 JBoss by Red Hat. All rights reserved.