title: Google Authenticator One-time Password Algorithm in C#
body: <p>I would like to calculate the OTP password generated via Google Authenticator or similar app in C#.</p>
  <p>I have found some Javascript implementations and Python but not for C#:</p>
  <p><a href="http://blog.tinisles.com/2011/10/google-authenticator-one-time-password-algorithm-in-javascript/" rel="noreferrer">http://blog.tinisles.com/2011/10/google-authenticator-one-time-password-algorithm-in-javascript/</a></p>
  <p><a href="https://stackoverflow.com/a/8549884/3850405">https://stackoverflow.com/a/8549884/3850405</a></p>
  <p>Has anyone done this in C# or should I just try to convert the javascript code to C#?</p>
  <p>Useful links:</p>
  <p><a href="https://www.rfc-editor.org/rfc/rfc6238" rel="noreferrer">https://www.rfc-editor.org/rfc/rfc6238</a></p>
  <p><a href="https://tools.ietf.org/id/draft-mraihi-totp-timebased-06.html" rel="noreferrer">https://tools.ietf.org/id/draft-mraihi-totp-timebased-06.html</a></p>