com.google.gdata.client.authn.oauth
Class OAuthRsaSha1Signer

java.lang.Object
  extended by com.google.gdata.client.authn.oauth.OAuthRsaSha1Signer
All Implemented Interfaces:
OAuthSigner

public class OAuthRsaSha1Signer
extends java.lang.Object
implements OAuthSigner

Signs strings using RSA-SHA1.


Constructor Summary
OAuthRsaSha1Signer(java.lang.String privateKeyString)
          Sets the RSA-SHA1 private key object used to sign this request.
 
Method Summary
 java.lang.String getSignature(java.lang.String baseString, OAuthParameters oauthParameters)
          Signs the input string using the appropriate signature method.
 java.lang.String getSignatureMethod()
          Gets the signature method for this specific implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthRsaSha1Signer

public OAuthRsaSha1Signer(java.lang.String privateKeyString)
                   throws OAuthException
Sets the RSA-SHA1 private key object used to sign this request.

Parameters:
privateKeyString - the Base-64 encoded private key string conforming to the PKCS #8 standard.
Throws:
OAuthException - if setting the private key fails
Method Detail

getSignature

public java.lang.String getSignature(java.lang.String baseString,
                                     OAuthParameters oauthParameters)
                              throws OAuthException
Description copied from interface: OAuthSigner
Signs the input string using the appropriate signature method.

Specified by:
getSignature in interface OAuthSigner
Parameters:
baseString - the string to sign
oauthParameters - the parameters related to the OAuth request or null
Returns:
the signed string
Throws:
OAuthException - if signing the request fails

getSignatureMethod

public java.lang.String getSignatureMethod()
Description copied from interface: OAuthSigner
Gets the signature method for this specific implementation.

Specified by:
getSignatureMethod in interface OAuthSigner
Returns:
the signature method used to sign the base string