com.mindbright.security.publickey
Class DHKeyAgreement

java.lang.Object
  |
  +--com.mindbright.jce.crypto.KeyAgreementSpi
        |
        +--com.mindbright.security.publickey.DHKeyAgreement

public final class DHKeyAgreement
extends com.mindbright.jce.crypto.KeyAgreementSpi


Constructor Summary
DHKeyAgreement()
           
 
Method Summary
protected  com.mindbright.jca.security.Key engineDoPhase(com.mindbright.jca.security.Key key, boolean lastPhase)
           
protected  byte[] engineGenerateSecret()
           
protected  int engineGenerateSecret(byte[] sharedSecret, int offset)
           
protected  com.mindbright.jce.crypto.SecretKey engineGenerateSecret(java.lang.String algorithm)
           
protected  void engineInit(com.mindbright.jca.security.Key key, com.mindbright.jca.security.spec.AlgorithmParameterSpec params, com.mindbright.jca.security.SecureRandom random)
           
protected  void engineInit(com.mindbright.jca.security.Key key, com.mindbright.jca.security.SecureRandom random)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DHKeyAgreement

public DHKeyAgreement()
Method Detail

engineInit

protected void engineInit(com.mindbright.jca.security.Key key,
                          com.mindbright.jca.security.SecureRandom random)
                   throws com.mindbright.jca.security.InvalidKeyException
Specified by:
engineInit in class com.mindbright.jce.crypto.KeyAgreementSpi
com.mindbright.jca.security.InvalidKeyException

engineInit

protected void engineInit(com.mindbright.jca.security.Key key,
                          com.mindbright.jca.security.spec.AlgorithmParameterSpec params,
                          com.mindbright.jca.security.SecureRandom random)
                   throws com.mindbright.jca.security.InvalidKeyException,
                          com.mindbright.jca.security.InvalidAlgorithmParameterException
Specified by:
engineInit in class com.mindbright.jce.crypto.KeyAgreementSpi
com.mindbright.jca.security.InvalidKeyException
com.mindbright.jca.security.InvalidAlgorithmParameterException

engineDoPhase

protected com.mindbright.jca.security.Key engineDoPhase(com.mindbright.jca.security.Key key,
                                                        boolean lastPhase)
                                                 throws com.mindbright.jca.security.InvalidKeyException,
                                                        java.lang.IllegalStateException
Specified by:
engineDoPhase in class com.mindbright.jce.crypto.KeyAgreementSpi
com.mindbright.jca.security.InvalidKeyException
java.lang.IllegalStateException

engineGenerateSecret

protected byte[] engineGenerateSecret()
                               throws java.lang.IllegalStateException
Specified by:
engineGenerateSecret in class com.mindbright.jce.crypto.KeyAgreementSpi
java.lang.IllegalStateException

engineGenerateSecret

protected int engineGenerateSecret(byte[] sharedSecret,
                                   int offset)
                            throws java.lang.IllegalStateException,
                                   com.mindbright.jce.crypto.ShortBufferException
Specified by:
engineGenerateSecret in class com.mindbright.jce.crypto.KeyAgreementSpi
java.lang.IllegalStateException
com.mindbright.jce.crypto.ShortBufferException

engineGenerateSecret

protected com.mindbright.jce.crypto.SecretKey engineGenerateSecret(java.lang.String algorithm)
                                                            throws java.lang.IllegalStateException,
                                                                   com.mindbright.jca.security.NoSuchAlgorithmException,
                                                                   com.mindbright.jca.security.InvalidKeyException
Specified by:
engineGenerateSecret in class com.mindbright.jce.crypto.KeyAgreementSpi
java.lang.IllegalStateException
com.mindbright.jca.security.NoSuchAlgorithmException
com.mindbright.jca.security.InvalidKeyException