calculates sha256 hash