com.digt.trusted.jce.provider
Class JCEGOSTDHKeyAgreement

java.lang.Object
  extended by javax.crypto.KeyAgreementSpi
      extended by com.digt.trusted.jce.provider.JCEGOSTDHKeyAgreement

public class JCEGOSTDHKeyAgreement
extends javax.crypto.KeyAgreementSpi


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

Constructor Detail

JCEGOSTDHKeyAgreement

public JCEGOSTDHKeyAgreement()
Method Detail

engineInit

protected void engineInit(java.security.Key key,
                          java.security.spec.AlgorithmParameterSpec params,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException,
                          java.security.InvalidAlgorithmParameterException
Specified by:
engineInit in class javax.crypto.KeyAgreementSpi
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

engineInit

protected void engineInit(java.security.Key key,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException
Specified by:
engineInit in class javax.crypto.KeyAgreementSpi
Throws:
java.security.InvalidKeyException

engineDoPhase

protected java.security.Key engineDoPhase(java.security.Key key,
                                          boolean lastPhase)
                                   throws java.security.InvalidKeyException,
                                          java.lang.IllegalStateException
Specified by:
engineDoPhase in class javax.crypto.KeyAgreementSpi
Throws:
java.security.InvalidKeyException
java.lang.IllegalStateException

importSessionKey

public javax.crypto.SecretKey importSessionKey(byte[] impkey)

exportSessionKey

public byte[] exportSessionKey(javax.crypto.SecretKey gsk)

engineGenerateSecret

protected byte[] engineGenerateSecret()
                               throws java.lang.IllegalStateException
Specified by:
engineGenerateSecret in class javax.crypto.KeyAgreementSpi
Throws:
java.lang.IllegalStateException

engineGenerateSecret

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

engineGenerateSecret

protected javax.crypto.SecretKey engineGenerateSecret(java.lang.String algorithm)
Specified by:
engineGenerateSecret in class javax.crypto.KeyAgreementSpi