# Class: com.pnfsoftware.jeb.util.encoding.HashCalculator

Memory and CPU efficient way to compute message digests. 

 This class supersedes [Hash](Hash).

## Constructor: HashCalculator
- parameter: `in`, type: `java.io.InputStream`
- parameter: `flags`, type: `int`


## Static Field: ADLER32
Type: `int`

Constant value: `2`

## Static Field: CRC32
Type: `int`

Constant value: `1`

## Static Field: MD5
Type: `int`

Constant value: `4`

## Static Field: SHA1
Type: `int`

Constant value: `8`

## Static Field: SHA256
Type: `int`

Constant value: `16`

## Method: compute
- return type: `boolean`

Description: Compute the requested digests and stream size.
return: true on success, false if one of the requested digest algorithm is not available
throws: on stream IO error

## Method: getAdler32
- return type: `long`


## Method: getCrc32
- return type: `long`


## Method: getMd5
- return type: `byte[]`


## Method: getSha1
- return type: `byte[]`


## Method: getSha256
- return type: `byte[]`


## Method: getSize
- return type: `long`


## Static Method: adler32
- parameter: `in`, type: `java.io.InputStream`
- return type: `java.lang.Long`

Description: Utility method.

## Static Method: crc32
- parameter: `in`, type: `java.io.InputStream`
- return type: `java.lang.Long`

Description: Utility method.

## Static Method: md5
- parameter: `in`, type: `java.io.InputStream`
- return type: `byte[]`

Description: Utility method.

## Static Method: sha1
- parameter: `in`, type: `java.io.InputStream`
- return type: `byte[]`

Description: Utility method.

## Static Method: sha256
- parameter: `in`, type: `java.io.InputStream`
- return type: `byte[]`

Description: Utility method.

