How do you encrypt URLs of pages?

I saw that Box.net does this for their shared pages:

http://www.box.net/shared/7g4q7pnok4

instead of the usual:

http://www.box.net/shared/12345

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”

HTH

RSL