A utility to generate a hash for NSObject subclasses.