net.i2p.crypto
Class HMACSHA256Generator

java.lang.Object
  extended bynet.i2p.crypto.HMACSHA256Generator

public class HMACSHA256Generator
extends java.lang.Object

Calculate the HMAC-SHA256 of a key+message. All the good stuff occurs in HMac and SHA256Digest.


Constructor Summary
HMACSHA256Generator(I2PAppContext context)
           
 
Method Summary
 Hash calculate(SessionKey key, byte[] data)
          Calculate the HMAC of the data with the given key
 Hash calculate(SessionKey key, byte[] data, int offset, int length)
          Calculate the HMAC of the data with the given key
static HMACSHA256Generator getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HMACSHA256Generator

public HMACSHA256Generator(I2PAppContext context)
Method Detail

getInstance

public static HMACSHA256Generator getInstance()

calculate

public Hash calculate(SessionKey key,
                      byte[] data)
Calculate the HMAC of the data with the given key


calculate

public Hash calculate(SessionKey key,
                      byte[] data,
                      int offset,
                      int length)
Calculate the HMAC of the data with the given key