How do you encrypt URLs of pages?

I saw that does this for their shared pages:

instead of the usual:

I Googled for the last hour, but still haven’t found out how to encrypt
URLs. Maybe I’m searching for the wrong terms.

Any ideas on how to “encrypt” URLs?

add an encrypted/hashed attribute on your model [and db]. then use
that attribute in the routing instead of id.

map.encrypted “/shared/:encrypted_attribute”, :controller =>
“some_controller”, :action => “some_action”