HashUtils

Utilities related to byte data hashing algorithms, at least providing MD5.

ConsiderApache Commons Codecfor a more comprehensive suite of digest utilities.

API

HashUtils.java
class HashUtils {
  Try<Hash> tryDigest(HashAlgorithm algorithm, byte[] bytes, int buffersize)     (1)
  Try<Hash> tryDigest(HashAlgorithm algorithm, DataSource dataSource, int buffersize)     (2)
}
1 tryDigest(HashAlgorithm, byte, int)

Optimized for when the input byte array is already present in memory.

2 tryDigest(HashAlgorithm, DataSource, int)

Optimized for direct InputStream processing, if possible, not reading all data into memory at once.

Members

tryDigest(HashAlgorithm, byte, int)

Optimized for when the input byte array is already present in memory.

tryDigest(HashAlgorithm, DataSource, int)

Optimized for direct InputStream processing, if possible, not reading all data into memory at once.