Class EciesAeadHkdfHybridEncrypt

  • All Implemented Interfaces:
    HybridEncrypt

    public final class EciesAeadHkdfHybridEncrypt
    extends java.lang.Object
    implements HybridEncrypt
    ECIES encryption with HKDF-KEM (key encapsulation mechanism) and AEAD-DEM (data encapsulation mechanism).
    Since:
    1.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static HybridEncrypt create​(EciesPublicKey key)  
      byte[] encrypt​(byte[] plaintext, byte[] contextInfo)
      Encrypts plaintext using contextInfo as info-parameter of the underlying HKDF.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static HybridEncrypt create​(EciesPublicKey key)
                                    throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • encrypt

        public byte[] encrypt​(byte[] plaintext,
                              byte[] contextInfo)
                       throws java.security.GeneralSecurityException
        Encrypts plaintext using contextInfo as info-parameter of the underlying HKDF.
        Specified by:
        encrypt in interface HybridEncrypt
        Returns:
        resulting ciphertext.
        Throws:
        java.security.GeneralSecurityException