tuweni / org.apache.tuweni.rlpx / EthereumIESEncryptionEngine / <init>

<init>

EthereumIESEncryptionEngine(agree: BasicAgreement, kdf: DerivationFunction, mac: Mac, commonMac: ByteArray)

Set up for use with stream mode, where the key derivation function is used to provide a stream of bytes to xor with the message.

Parameters

agree - the key agreement used as the basis for the encryption

kdf - the key derivation function used for byte generation

mac - the message authentication code generator for the message

commonMac - the common MAC bytes to append to the mac

EthereumIESEncryptionEngine(agree: BasicAgreement, kdf: DerivationFunction, mac: Mac, commonMac: ByteArray, cipher: BufferedBlockCipher)

Set up for use in conjunction with a block cipher to handle the message. It is strongly recommended that the cipher is not in ECB mode.

Parameters

agree - the key agreement used as the basis for the encryption

kdf - the key derivation function used for byte generation

mac - the message authentication code generator for the message

commonMac - the common MAC bytes to append to the mac

cipher - the cipher to used for encrypting the message