Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
final class: HmacCore [javadoc | source]
java.lang.Object
   com.sun.crypto.provider.HmacCore

All Implemented Interfaces:
    Cloneable

This class constitutes the core of HMAC- algorithms, where can be SHA1 or MD5, etc. See RFC 2104 for spec. It also contains the implementation classes for the SHA-256, SHA-384, and SHA-512 HMACs.
    author: Jan - Luehe
Nested Class Summary:
public static final class  HmacCore.HmacSHA256   
public static final class  HmacCore.HmacSHA384   
public static final class  HmacCore.HmacSHA512   
Constructor:
 HmacCore(MessageDigest md,
    int bl) 
    Standard constructor, creates a new HmacCore instance using the specified MessageDigest object.
 HmacCore(String digestAlgorithm,
    int bl) throws NoSuchAlgorithmException 
    Standard constructor, creates a new HmacCore instance instantiating a MessageDigest of the specified name.
Method from com.sun.crypto.provider.HmacCore Summary:
clone,   doFinal,   getDigestLength,   init,   reset,   update,   update,   update
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.HmacCore Detail:
 public Object clone() throws CloneNotSupportedException 
 byte[] doFinal() 
    Completes the HMAC computation and resets the HMAC for further use, maintaining the secret key that the HMAC was initialized with.
 int getDigestLength() 
    Returns the length of the HMAC in bytes.
  void init(Key key,
    AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException 
    Initializes the HMAC with the given secret key and algorithm parameters.
  void reset() 
    Resets the HMAC for further use, maintaining the secret key that the HMAC was initialized with.
  void update(byte input) 
    Processes the given byte.
  void update(ByteBuffer input) 
  void update(byte[] input,
    int offset,
    int len) 
    Processes the first len bytes in input, starting at offset.