0

Is It possible to generate HMACSHA1 oauth_signature in java without using OAuthConsumer of signpost library, so it can be easily implemented with other languages like objective-c etc?

1 Answer 1

2

Yes, since HMACSHA1 is a standard you can write your own implementation.

This is a gist with an example

Here a gist with Objective-c example

6
  • Thanks for your consideration. can you tell me what would be the data as a parameter in 'calculateRFC2104HMAC()' method in the above first example. I am curious about the parameter 'data'. May 19, 2016 at 6:12
  • 1
    The parameter data is the message that you want to encrypt. You can take a look here. This is the HMAC spec. But in your code what you need to inform depends of what are you doing. This is a tutorial of how to sign a request using OAuth1. May 19, 2016 at 11:29
  • can you please tell me how would i generate signature base string so that can i be sent it as a parameter in method. May 19, 2016 at 14:11
  • Could you describe the kind of system are you trying to develop and what service are you trying to connect ? May 19, 2016 at 17:22
  • I am trying to make request of request_token api using OAuth1.0 May 21, 2016 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.