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

init

open fun init(forEncryption: Boolean, privParam: CipherParameters, pubParam: CipherParameters, params: CipherParameters): Unit (source)

Initialise the encryptor.

Parameters

forEncryption - whether or not this is encryption/decryption.

privParam - our private key parameters

pubParam - the recipient's/sender's public key parameters

params - encoding and derivation parameters, may be wrapped to include an IV for an underlying block cipher.

open fun init(publicKey: AsymmetricKeyParameter, params: CipherParameters, ephemeralKeyPairGenerator: EphemeralKeyPairGenerator): Unit (source)

Initialise the decryptor.

Parameters

publicKey - the recipient's/sender's public key parameters

params - encoding and derivation parameters, may be wrapped to include an IV for an underlying block cipher.

ephemeralKeyPairGenerator - the ephemeral key pair generator to use.

open fun init(privateKey: AsymmetricKeyParameter, params: CipherParameters, publicKeyParser: KeyParser): Unit (source)

Initialise the encryptor.

Parameters

privateKey - the recipient's private key.

params - encoding and derivation parameters, may be wrapped to include an IV for an underlying block cipher.

publicKeyParser - the parser for reading the ephemeral public key.