public class HashUtils extends Object
| Constructor and Description |
|---|
HashUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
computeHash(InputStream is,
MessageDigest messageDigest) |
static byte[] |
computeMd5Hash(InputStream is)
Computes the MD5 hash of the data in the given input stream and returns it as an array of bytes.
|
static byte[] |
computeSha256Hash(InputStream is) |
public static byte[] computeMd5Hash(InputStream is) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmExceptionIOExceptionpublic static byte[] computeSha256Hash(InputStream is) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmExceptionIOExceptionpublic static byte[] computeHash(InputStream is, MessageDigest messageDigest) throws IOException
IOExceptionCopyright © 2021. All rights reserved.