title: How to generate token based on few fields
body: <p>I am in need of generating a token for users to cancel their membership. Now  I need multiple fields in token table. </p>
  
  <p>Currently I am using str_rand(26) but there is a possibility that it would generate a string that is already in a databse because when user click on cancel link I get the table entry based on token so it is not a good model.</p>
  
  <p>What I want is to provide few fields and based on those fields a token is generated and when I receive that token I can get those IDS back and access that particular row.</p>
  
  <pre><code>For example generate_token(user_id + payment_id + registration_id)
  </code></pre>
  
  <p>OR if there is better work around for such task than please do share.</p>