public class OAuthRsaSha1Signer extends Object implements OAuthSigner
| Constructor and Description |
|---|
OAuthRsaSha1Signer()
Constructor for
OAuthRsaSha1Signer. |
OAuthRsaSha1Signer(byte[] privateKeyBytes)
Sets the RSA-SHA1 private key object used to sign this request.
|
OAuthRsaSha1Signer(PrivateKey privateKey)
Sets the RSA-SHA1 private key object used to sign this request.
|
OAuthRsaSha1Signer(String privateKeyString)
Sets the RSA-SHA1 private key object used to sign this request.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSignature(String baseString,
OAuthParameters oauthParameters)
Signs the input string using the appropriate signature method.
|
String |
getSignatureMethod()
Gets the signature method for this specific implementation.
|
void |
setPrivateKey(PrivateKey privateKey)
Sets the
PrivateKey used to sign requests. |
public OAuthRsaSha1Signer()
OAuthRsaSha1Signer. This form of the constructor
does not set the private key, so be sure to call
setPrivateKey(PrivateKey) before signing requests.public OAuthRsaSha1Signer(PrivateKey privateKey) throws OAuthException
privateKey - the PrivateKey to use to initialize
the signer.OAuthException - if setting the private key failspublic OAuthRsaSha1Signer(String privateKeyString) throws OAuthException
privateKeyString - the Base-64 encoded private key string conforming
to the PKCS #8 standard.OAuthException - if setting the private key failspublic OAuthRsaSha1Signer(byte[] privateKeyBytes)
throws OAuthException
privateKeyBytes - the Base-64 encoded private key conforming to the
PKCS #8 standard.OAuthException - if setting the private key failspublic void setPrivateKey(PrivateKey privateKey) throws OAuthException
PrivateKey used to sign requests.privateKey - OAuthException - if the private key is null.public String getSignature(String baseString, OAuthParameters oauthParameters) throws OAuthException
OAuthSignergetSignature in interface OAuthSignerbaseString - the string to signoauthParameters - the parameters related to the OAuth request or
nullOAuthException - if signing the request failspublic String getSignatureMethod()
OAuthSignergetSignatureMethod in interface OAuthSignerCopyright © 2012. All Rights Reserved.