Class WolfCryptKeyAgreement

java.lang.Object
javax.crypto.KeyAgreementSpi
com.wolfssl.provider.jce.WolfCryptKeyAgreement
Direct Known Subclasses:
WolfCryptKeyAgreement.wcDH, WolfCryptKeyAgreement.wcECDH

public class WolfCryptKeyAgreement
extends javax.crypto.KeyAgreementSpi
wolfCrypt JCE Key Agreement wrapper
Version:
1.0, March 2017
Author:
wolfSSL
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  WolfCryptKeyAgreement.wcDH  
    static class  WolfCryptKeyAgreement.wcECDH  
  • Method Summary

    Modifier and Type Method Description
    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.SecureRandom random)  
    protected void engineInit​(java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)  
    protected void finalize()  

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • 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
    • 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) throws java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
      Specified by:
      engineGenerateSecret in class javax.crypto.KeyAgreementSpi
      Throws:
      java.lang.IllegalStateException
      java.security.NoSuchAlgorithmException
      java.security.InvalidKeyException
    • 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
    • finalize

      protected void finalize() throws java.lang.Throwable
      Overrides:
      finalize in class java.lang.Object
      Throws:
      java.lang.Throwable