Optimize hashing

The method IOUtils.toByteArray() is far more efficient than the formerly used while-loop.
Removed unused imports
Variable name changed
Merge pull request #195 from muffl0n/1.7_hash_optimize

Optimize hashing