encryptWithIv

open suspend override fun encryptWithIv(iv: ByteArray, plaintext: ByteArray): ByteArray(source)

Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteArray.

Use encryptWithIvBlocking when calling from non-suspending code.


open suspend override fun encryptWithIv(iv: ByteString, plaintext: ByteString): ByteString(source)

Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteString.

Use encryptWithIvBlocking when calling from non-suspending code.


open suspend fun encryptWithIv(iv: ByteArray, plaintext: ByteArray, associatedData: ByteArray?): ByteArray(source)

Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteArray.

Use encryptWithIvBlocking when calling from non-suspending code.


open suspend fun encryptWithIv(iv: ByteString, plaintext: ByteString, associatedData: ByteString?): ByteString(source)

Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteString.

Use encryptWithIvBlocking when calling from non-suspending code.