Sometimes the translation algorithm makes errors, for example: vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin can be decoded into both vvbfbfjghfuetiketuivbgckfjlflgtnvenblckvtclj and vvbtbtndhtlfguefgluvbdcetnitidgkvfkbicevgcin.
Maybe it would be better to prefer the one that matches the original instead of just taking the first?
I'll dig in and try to figure out what is the best way to do in cases like this (picking the matching one or picking the first one).
If there are multiple interpretations for a given OTP, first try to f…
…ind the one
which matches the input OTP. If the one is found, use the input OTP, otherwise
use last of the available interpretations.
Reported by Klas Lindfors, part of #14.
I've pushed a branch which should improve this behavior - #15.
Can you please have a look / review it?
It looks good to me (as in it works as I expect it to..) =)
@klali Thanks, I've merged it into master.
I will work on creating a new release and publish it on PyPi later today.
New version (1.6.2) with this change has been published to PyPi - https://pypi.python.org/pypi/yubico/1.6.2