com.googlecode.jinahya.twitter.xauth
Class JCAAuthenticator

java.lang.Object
  extended by 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.
 
Constructor Summary
JCAAuthenticator()
           
 
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
 

Field Detail

ALGORITHM

protected static final String ALGORITHM
Standard algorithm name for HMAC-SHA1.

See Also:
Constant Field Values
Constructor Detail

JCAAuthenticator

public JCAAuthenticator()
Method Detail

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 - key
input - 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.