Added /api/hash endpoint.

This should resolve #643.