oath-toolkit-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OATH-Toolkit-help] Help with OATHLIB


From: Ilkka Virta
Subject: Re: [OATH-Toolkit-help] Help with OATHLIB
Date: Tue, 29 Mar 2016 18:25:52 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 29.3. 12:06, derek cooper wrote:
Hello,

I am trying to generate TOTP tokens using OATHLIB, with the following
test program:

const char* secret="12345678901234567890123456789011";

However the token generated does not match with the same token using
oathtool, when i use a real token (values above are dummy ones) oathtool
returns the correct value, but the test c program does not. the results:

Oathtool takes a hexadecimal representation of the key, the library function seems to take the raw binary value. For example, with
secret = "abcd" in your code should give the same value as
'oathtool --totp 61626364' on the command line.


--
Ilkka Virta <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]