Expose hash calculation as part of the public API.
Fix missing token string name.