decryptWithIv

open suspend override fun decryptWithIv(iv: ByteArray, ciphertext: ByteArray): ByteArray(source)

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

Throws an exception if the authentication tag verification fails, indicating the ciphertext has been tampered with.

Use decryptWithIvBlocking when calling from non-suspending code.


open suspend override fun decryptWithIv(iv: ByteString, ciphertext: ByteString): ByteString(source)

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

Throws an exception if the authentication tag verification fails, indicating the ciphertext has been tampered with.

Use decryptWithIvBlocking when calling from non-suspending code.


open suspend fun decryptWithIv(iv: ByteArray, ciphertext: ByteArray, associatedData: ByteArray?): ByteArray(source)

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

Throws an exception if the authentication tag verification fails, indicating the ciphertext or associated data has been tampered with.

Use decryptWithIvBlocking when calling from non-suspending code.


open suspend fun decryptWithIv(iv: ByteString, ciphertext: ByteString, associatedData: ByteString?): ByteString(source)

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

Throws an exception if the authentication tag verification fails, indicating the ciphertext or associated data has been tampered with.

Use decryptWithIvBlocking when calling from non-suspending code.