Oauth Authentication by using RSA SHA1 in java -


i have searched , found below code hmacsha1. have generated signature , want use rsa-sha1 algorithm . stuck in generating oauth_signature , implementing further steps oauth. please share more clear solution

public static string computesignature(string basestring,string keystring) throws generalsecurityexception, unsupportedencodingexception {

    secretkey secretkey = null;      byte[] keybytes = keystring.getbytes();     secretkey = new secretkeyspec(keybytes, "hmacsha1");      mac mac = mac.getinstance("hmacsha1");      mac.init(secretkey);      byte[] text = basestring.getbytes();      return new string(base64.encodebase64(mac.dofinal(text))).trim(); } 

}


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -