markbao/speakeasy — pull request #19 by korbin (2013-10-24 06:53:34+00:00)
Title: Fix encoding issues, RFC4226 discrepancies

I encountered insane UTF8/ASCII issues with Google-provided base32 keys - some kind of encoding issue took place due to the fact that the key buffer was not properly initialized as an ASCII buffer.

This patch fixes the ASCII buffer issue, allowing otp generation to work consistently.

This patch also implements truncation as per RFC4226 instead of using substrings.