Implement self-contained hash type for convenience.