open class EthereumIESEncryptionEngine
(source)
Support class for constructing integrated encryption ciphers for doing basic message exchanges on top of key agreement ciphers. Follows the description given in IEEE Std 1363a.
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. 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. |
open fun getCipher(): BufferedBlockCipher |
|
open fun getMac(): Mac |
|
open fun init(forEncryption: Boolean, privParam: CipherParameters, pubParam: CipherParameters, params: CipherParameters): Unit open fun init(privateKey: AsymmetricKeyParameter, params: CipherParameters, publicKeyParser: KeyParser): Unit
Initialise the encryptor. open fun init(publicKey: AsymmetricKeyParameter, params: CipherParameters, ephemeralKeyPairGenerator: EphemeralKeyPairGenerator): Unit
Initialise the decryptor. |
|
open fun processBlock(in: ByteArray, inOff: Int, inLen: Int): ByteArray |