public class HMAC_SHA1 extends Object implements OAuthSignatureMethod
| Constructor and Description |
|---|
HMAC_SHA1() |
| Modifier and Type | Method and Description |
|---|---|
String |
name()
Returns the name of this signature method, as negotiated through the
OAuth protocol.
|
String |
sign(String elements,
OAuthSecrets secrets)
Generates the HMAC-SHA1 signature of OAuth request elements.
|
boolean |
verify(String elements,
OAuthSecrets secrets,
String signature)
Verifies the HMAC-SHA1 signature of OAuth request elements.
|
public static final String NAME
public String name()
OAuthSignatureMethodname in interface OAuthSignatureMethodpublic String sign(String elements, OAuthSecrets secrets)
sign in interface OAuthSignatureMethodelements - the combined OAuth elements to sign.secrets - the shared secrets used to sign the request.public boolean verify(String elements, OAuthSecrets secrets, String signature)
verify in interface OAuthSignatureMethodelements - OAuth elements signature is to be verified against.secrets - the shared secrets for verifying the signature.signature - base64-encoded OAuth signature to be verified.Copyright © 2016 Oracle Corporation. All rights reserved.