Fixed bitwise negation bug. Now the hash function matches the expected digest.