ENH: Add hashing

Ready for review.