Changed the methods for computing hash

Merge methods which uses different hash algorithms. You can use one
method and specify algorithm by HashAlgorithm type parameter