I'd say that your Base64 algorithm is bad.


PS: When I generate a signature for the first one, I get
"yOahq5m0YjDDjfjxHaXEsW9D+X0=" which matches the Twitter version.

On 9/22/10 5:13 PM, Randomness wrote:
> As I am testing my application, I am running into a weird problem with
> signature generation. I am using the HMAC-SHA1 algorithm to generate a
> signature key that is 40 characters long. I subsequently convert this
> to bytes and base64 encode this. Comparing this with the example on
> twitter.com I get a minor deviation, where the first signature is
> generated by Twitter and the second one by me:
> yOahq5m0YjDDjfjxHaXEsW9D+X0=
> yOahqz+0YjDDjfjxHaXEsW9D+X0=
> Subsequent tests with a reliable testing program for signature
> generation gives a similar problem:
> xeJLDda1e1EEYWZcMValATjsaD8=
> xeJLDda1e1EEYWZcMValATjsaI4=
> and another one:
> dA8f6BIEz0o/GEtxwJ3ZtvPeP+o=
> dA8f6BIEz0qDGEtxwJ3ZtvPeiOo=
> They are so close, but still different. Does anyone have any idea what
> this is ?

Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 

Reply via email to