title: How Do Hardware Token Devices work?
body: <p>Recently, my bank sent me this tiny device that generates a unique code that must be used when performing online transactions, all the device does is generate this unique code when I press a particular white button and it doesn't look like it connects to a remote server or anything of such.</p>
  
  <p>I did some research and ended up in cryptography with something called the <a href="http://en.wikipedia.org/wiki/Hash_function" rel="noreferrer">Hash function</a> but I still don't get it.</p>
  
  <p><strong>My Questions</strong></p>
  
  <ul>
  <li>How does my bank's servers know the code generated by this device is correct?</li>
  <li>Since it just generates five random digits every 30 seconds, why won't the server authenticate a random number I have also decided to use?</li>
  </ul>