Its accepting a hash algorithm. So you can select whatever algorithm you want. Also if you really care about performance you can only allocate a hash object once. Basically this function works with more than just sha256 and its expressing that.