public class RSA_SHA1 extends java.lang.Object implements OAuthSignatureMethod
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
RSA_SHA1() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
name()
Returns the name of this signature method, as negotiated through the
OAuth protocol.
|
java.lang.String |
sign(java.lang.String elements,
OAuthSecrets secrets)
Generates the RSA-SHA1 signature of OAuth request elements.
|
boolean |
verify(java.lang.String elements,
OAuthSecrets secrets,
java.lang.String signature)
Verifies the RSA-SHA1 signature of OAuth request elements.
|
public static final java.lang.String NAME
public java.lang.String name()
OAuthSignatureMethodname in interface OAuthSignatureMethodpublic java.lang.String sign(java.lang.String elements,
OAuthSecrets secrets)
throws InvalidSecretException
sign in interface OAuthSignatureMethodelements - the combined OAuth elements to sign.secrets - the secrets object containing the private key for generating the signature.InvalidSecretException - if the supplied secret is not valid.public boolean verify(java.lang.String elements,
OAuthSecrets secrets,
java.lang.String signature)
throws InvalidSecretException
verify in interface OAuthSignatureMethodelements - OAuth elements signature is to be verified against.secrets - the secrets object containing the public key for verifying the signature.signature - base64-encoded OAuth signature to be verified.InvalidSecretException - if the supplied secret is not valid.Copyright © 2016 Oracle Corporation. All Rights Reserved.