org.bouncycastle.crypto.agreement.kdf
Class DHKEKGenerator

java.lang.Object
  extended by org.bouncycastle.crypto.agreement.kdf.DHKEKGenerator
All Implemented Interfaces:
DerivationFunction

public class DHKEKGenerator
extends java.lang.Object
implements DerivationFunction

RFC 2631 Diffie-hellman KEK derivation function.


Field Summary
private  DERObjectIdentifier algorithm
           
private  Digest digest
           
private  int keySize
           
private  byte[] partyAInfo
           
private  byte[] z
           
 
Constructor Summary
DHKEKGenerator(Digest digest)
           
 
Method Summary
 int generateBytes(byte[] out, int outOff, int len)
           
 Digest getDigest()
          return the message digest used as the basis for the function
 void init(DerivationParameters param)
           
private  byte[] integerToBytes(int keySize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

digest

private final Digest digest

algorithm

private DERObjectIdentifier algorithm

keySize

private int keySize

z

private byte[] z

partyAInfo

private byte[] partyAInfo
Constructor Detail

DHKEKGenerator

public DHKEKGenerator(Digest digest)
Method Detail

init

public void init(DerivationParameters param)
Specified by:
init in interface DerivationFunction

getDigest

public Digest getDigest()
Description copied from interface: DerivationFunction
return the message digest used as the basis for the function

Specified by:
getDigest in interface DerivationFunction

generateBytes

public int generateBytes(byte[] out,
                         int outOff,
                         int len)
                  throws DataLengthException,
                         java.lang.IllegalArgumentException
Specified by:
generateBytes in interface DerivationFunction
Throws:
DataLengthException
java.lang.IllegalArgumentException

integerToBytes

private byte[] integerToBytes(int keySize)