com.baidubce.util
Class HashUtils
java.lang.Object
com.baidubce.util.HashUtils
public class HashUtils
- extends Object
Utility methods for computing MD5 sums.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HashUtils
public HashUtils()
computeMd5Hash
public static byte[] computeMd5Hash(InputStream is)
throws NoSuchAlgorithmException,
IOException
- Computes the MD5 hash of the data in the given input stream and returns it as an array of bytes.
- Throws:
NoSuchAlgorithmException
IOException
computeSha256Hash
public static byte[] computeSha256Hash(InputStream is)
throws NoSuchAlgorithmException,
IOException
- Throws:
NoSuchAlgorithmException
IOException
computeHash
public static byte[] computeHash(InputStream is,
MessageDigest messageDigest)
throws IOException
- Throws:
IOException
Copyright © 2018. All rights reserved.