<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=3&amp;t=118" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2008-06-25T18:36:36+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=3&amp;t=118</id>
<entry>
<author><name><![CDATA[Jester]]></name></author>
<updated>2008-06-25T18:36:36+01:00</updated>
<published>2008-06-25T18:36:36+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=118&amp;p=355#p355</id>
<link href="https://forum.yubico.com/viewtopic.php?t=118&amp;p=355#p355"/>
<title type="html"><![CDATA[Re: Problems with BAD_SIGNATURE]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=118&amp;p=355#p355"><![CDATA[
Got this working now ... why are (almost) all the most infuriating problems the easiest solutions  <img src="https://forum.yubico.com/images/smilies/icon_redface.gif" alt=":oops:" title="Embarrassed" /> :<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">byte&#91;&#93; dataBuffer = System.Text.Encoding.ASCII.GetBytes(sParams);</div><br /><br />should read:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">byte&#91;&#93; dataBuffer = System.Text.Encoding.UTF8.GetBytes(sParams);</div><br /><br /><br /> <img src="https://forum.yubico.com/images/smilies/icon_cool.gif" alt="8-)" title="Cool" /><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=177">Jester</a> — Wed Jun 25, 2008 6:36 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jester]]></name></author>
<updated>2008-06-25T14:00:51+01:00</updated>
<published>2008-06-25T14:00:51+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=118&amp;p=350#p350</id>
<link href="https://forum.yubico.com/viewtopic.php?t=118&amp;p=350#p350"/>
<title type="html"><![CDATA[Problems with BAD_SIGNATURE]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=118&amp;p=350#p350"><![CDATA[
I am having problems implementing the signature checking in C#.  I have used the Microsoft MSDN hmac SHA1 example to encode the parameters with no luck.  All I get is the dreaded BAD_SIGNATURE.<br /><br />Any ideas?<br /><br />_authid and otp was populated correctly and without the &amp;h... it works STATUS=OK<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">            String sParams = &quot;id=&quot; + _authId + &quot;&amp;otp=&quot; + otp;<br />            String sAPIKeyUtf8 = base64Decode(APIKEY);<br />            String shmac;<br /><br />            HMACSHA1 hmacsha1 = new HMACSHA1();<br />            hmacsha1.Key = Encoding.ASCII.GetBytes(sAPIKeyUtf8);<br />            byte&#91;&#93; dataBuffer = System.Text.Encoding.ASCII.GetBytes(sParams);<br />            byte&#91;&#93; hashBytes = hmacsha1.ComputeHash(dataBuffer);<br />            shmac = Convert.ToBase64String(hashBytes);<br /><br />            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(YUBICO_AUTH_SRV_URL + _authId + &quot;&amp;otp=&quot; + otp + &quot;&amp;h=&quot; + shmac);<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=177">Jester</a> — Wed Jun 25, 2008 2:00 pm</p><hr />
]]></content>
</entry>
</feed>