I compare my base-string with this output with same inputs(http://oauth.googlecode.com/svn/code/javascript/example/signature.html) which is also the same. When i gererate signature with my code. But my signature is not working.HELP!


If i add same inputs in Time-stamp & same nonce value on site((http://oauth.googlecode.com/svn/code/javascript/example/signature.html) and generate Header its working well. But when i use my code in android:

public String getSignature(String method, String value, String key){
String signature="";
try {
Mac m = Mac.getInstance(method);
m.init(new SecretKeySpec(key.getBytes(“UTF-8”), method));
byte[] res = m.doFinal(value.getBytes(“UTF-8”));
signature= Base64.encodeToString(res, Base64.DEFAULT);
} catch (Exception e) {
android.util.Log.v(“TAG”,“Exception [”+e.getMessage()+"]", e);
return signature;

Signature is not SAME as on given site even BASE STRING is same and all input param are same…PLEASE HELP me to come out of these…Thank you.