The solution is not hashing, in general. Hashing may lead to collisions, and we don't want tenants (projects) colliding.

For deployments behind keystone, this problem is solved -- just let keystone prevent users from creating false project-ids via something like keystone auth middleware.

More generally, any mechanism that prevents the users from crafting their own project-id would be sufficient.