The online one is giving you a base 64 encoded value (which should be
used).  The string you gave (8B0E9AFC15E265C49A687F7FC0C389A1F0B791C3)
looks like it's a hex representation of a byte array.  Can you try to
base 64 encode that and see if there are differences?

  ---Mark

On Sun, Nov 29, 2009 at 9:13 AM, abruton <andrebru...@gmail.com> wrote:
> Hi All
>
> I'm battling with the oauth stuff, but it looks like my HMAC-SHA1
> hashing does not generate the right strings for long input strings.
>
> Eg:
>
> I enter the following:
>
> Normalised Parameters:
> oauth_consumer_key=key&oauth_nonce=1112009295818146IJ2592BY08TKD28W8IHG5179&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1259521081&oauth_version=1.0
>
> And my string to sign is:
>
> GET&http%3A%2F%2Fterm.ie%2Foauth%2Fexample
> %2Frequest_token.php&oauth_consumer_key%3Dkey%26oauth_nonce
> %3D1112009295818146IJ2592BY08TKD28W8IHG5179%26oauth_signature_method
> %3DHMAC-SHA1%26oauth_timestamp%3D1259521081%26oauth_version%3D1.0
>
> I generate a hash 8B0E9AFC15E265C49A687F7FC0C389A1F0B791C3 but the
> online one says it should be uyvprElXXCt+KgZ8VCUhPt8FJN0=    This is
> much shorter than mine.
>
> I've tested the script on short data strings and it gives the right
> answer.
>
> 1. Is my string above correct for hashing and generating a signature?
>
> 2. The & just before the oauth_consumer_key should be a ? (question
> mark) on windows servers. Does this have to be ? or a & ?
>
> 3. Does anyone have examples of correct strings to hash and the
> correct signature?
>
> Best regards
>
> Andre
>

Reply via email to