Optimize hashing

By using the method IOUtils.toByteArray() instead of this while loop
```
      while (digestIs.read() != -1) {
      }
```
I got the processing time on my webapp down by 17% (from 2m45s to 2m17s).