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[] |
hashBytes(byte[] bytes) |
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
IOException
public static byte[] hashBytes(byte[] bytes) throws IOException
IOException
public static byte[] copyAndGetHash(InputStream is, OutputStream os) throws IOException
IOException
public static String bytesToHexString(byte[] bytes)
bytes
- the bytespublic static byte[] hexStringToByteArray(String s)
s
- the stringCopyright © 2023 JBoss by Red Hat. All rights reserved.