title: Encrypted ID in URLs
body: <p>I am trying to hash or encrypt a record's ID for URLs such that people can't view various records simply by guessing different integer IDs.</p>
  
  <p>Essentially, my URLs would be something like this: /plans/0AUTxwoGkOYfiZGd2
  instead of /plans/304.</p>
  
  <p>Would the best way to do this just be to use SHA-1 to hash the plan's id and store it in a hashed_id column for plans? Then, overwrite to_param and add a finder to find by hashed_id?</p>
  
  <p>How do you ensure that the characters generated are 0-9, a-z, or A-Z?</p>
  
  <p>Thanks!</p>