com.googlecode.jinahya.twitter.xauth
Class JCAAuthenticator
java.lang.Object
com.googlecode.jinahya.twitter.xauth.JCAAuthenticator
- All Implemented Interfaces:
- Authenticator
public class JCAAuthenticator
- extends Object
- implements Authenticator
- Author:
- Jin Kwon
|
Field Summary |
protected static String |
ALGORITHM
Standard algorithm name for HMAC-SHA1. |
|
Method Summary |
byte[] |
authenticate(byte[] key,
byte[] input)
Generates HMAC-SAH1 signature with given key and
input. |
protected Mac |
getInstance()
Returns a Mac instance for "HmacSHA1". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALGORITHM
protected static final String ALGORITHM
- Standard algorithm name for HMAC-SHA1.
- See Also:
- Constant Field Values
JCAAuthenticator
public JCAAuthenticator()
authenticate
public byte[] authenticate(byte[] key,
byte[] input)
throws Exception
- Description copied from interface:
Authenticator
- Generates HMAC-SAH1 signature with given
key and
input.
- Specified by:
authenticate in interface Authenticator
- Parameters:
key - keyinput - input
- Returns:
- signature
- Throws:
Exception - if any error occurs.
getInstance
protected Mac getInstance()
throws Exception
- Returns a Mac instance for "HmacSHA1".
- Returns:
- a Mac instance.
- Throws:
Exception - if any error occurs.
Copyright © 2011. All Rights Reserved.