It's an addition so that existing code does not break, and the current ProvisionURI returns the same values as before (I added a test to validate before and after the change).
Smaller changes: return an invalid code in case of error in ComputeCode (thanks for confirming that -1 is indeed invalid as per the RFCs), get rid of the fmt dependency and remove unused second return value in the internal checkXxx functions.
Let me know if you want me to tweak a few things (or if you're not interested in the PR).
Hi Damian,
The major change is the addition of ProvisionURIWithIssuer method, that respects the recommendations found here: https://code.google.com/p/google-authenticator/wiki/ConflictingAccounts
It's an addition so that existing code does not break, and the current ProvisionURI returns the same values as before (I added a test to validate before and after the change).
Smaller changes: return an invalid code in case of error in ComputeCode (thanks for confirming that -1 is indeed invalid as per the RFCs), get rid of the
fmt
dependency and remove unused second return value in the internalcheckXxx
functions.Let me know if you want me to tweak a few things (or if you're not interested in the PR).
Thanks! Martin