Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7058069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:04:07+00:00 2026-05-28T04:04:07+00:00

I am trying to verify an OAuth signature generated in code against a known

  • 0

I am trying to verify an OAuth signature generated in code against a “known reputable source”. All my steps are verified correct except the last, wherein a ‘base signature string’ is HMAC-SHA1 hashed against a secret key and then base64 encoded.

I have confirmed that my hash value is the same as expected by the algorithm. I then disconfirmed that my base64 encode was the same. Attempting to determine why my encode failed, I wanted to check the encoder I was using.

Here is the (hash) string being base64 encoded:

203ebb13a65cccaae5cb1b9d5af51fe41f534357

Here is the base64 encode that results in my code:

MjAzZWJiMTNhNjVjY2NhYWU1Y2IxYjlkNWFmNTFmZTQxZjUzNDM1Nw==

According to http://www.motobit.com/util/base64-decoder-encoder.asp, that is the correct result:

Base64 1

But, according to http://www.online-convert.com/result/096d7b00138f3726daee5f6ddb107a62 (provided with the secret and base string, not the hash), a different base64 should have been output. Note that the hash output is my correct hash despite the difference in base64:

Base64 1

Finally, the “official” tester (http://hueniverse.com/oauth/guide/authentication/) outputs a third different base64 from the same hash:

Base64 1

I have no idea what I’m doing wrong, and the fact that these tools are outputting different results makes me wonder if there is in fact such a thing as base64 encoding or if they are actually using different algorithms? Perhaps the fact that it’s for OAuth would help you help me identify the answer.

Thanks for any leads from the wise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:04:08+00:00Added an answer on May 28, 2026 at 4:04 am

    OK, in this case the first website was making the same “mistake” I was (in my case it was a mistake, the first website may just be making an unstated assumption).

    That mistake is whether the hash is interpreted as a string (which gets base64encoded) or as a series of hexadecimal values which get base64encoded. In the former case, the resultant encode is longer than the original string, while in the latter the resultant encode is shorter than the original string. This is not only empirically true but the interwebs show that it is one of the concepts behind the standard in the first place.

    The second website, working from (as stated) “hex” data, got the correct answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to verify that my Rails code calls ActiveRecord's all method (all
I'm trying to verify whether or not you can run reports against from the
I'm trying to implement the following code: verify.html: <input type=text id=vericode style=position:relative;top:-3px;width:70px;height:20px;border:1px solid #928b8b
I am trying to verify the paypal pdt information. I generated my mockup form
While trying to verify to myself, that C# Equals for IEnumerables is a reference
I'm trying to verify if a schema matches the objects I'm initializing. Is there
I am trying to verify whether an object is null or not, using this
I'm trying to get it to verify that it has the same item in
I'm trying to use mock to verify that an index property has been set.
I am trying to write a unit test for my one controller to verify

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.