title: Token Authentication in Meteor
body: <p>I would like to expose an API from my meteor application for my iOS application. My plan is to create a RESTful API and have the iOS application authenticate using a token. I want to store an hash of the token in the User model provided by the <code>Accounts</code> package and have the user send the token with each request to authenticate with the hash.</p>
  
  <p>How can I do this?</p>
  
  <p>I have seen found the <code>Random.secret([n])</code> in meteor <a href="http://docs.meteor.com/#/full/random" rel="nofollow">documentation</a>, so I will be able to create a token with this method, but <strong>couldn't find a way to encrypt it</strong>. I see that some meteor packages (account-password?) uses <code>npm-bcrypt</code> package but couldn't find any information on how to use it.</p>