Implement stream hashing.