openDetached

actual fun openDetached(ciphertext: UByteArray, tag: UByteArray, nonce: UByteArray, sendersPublicKey: UByteArray, recipientsSecretKey: UByteArray): UByteArray

The crypto_box_open_detached() function verifies and decrypts an encrypted message c whose length is clen using the recipient's secret key sk and the sender's public key pk. clen doesn't include the tag, so this length is the same as the plaintext. The plaintext is put into m after verifying that mac is a valid authentication tag for this ciphertext, with the given nonce n and key k. The function throws BoxCorruptedOrTamperedDataException if the verification fails.

expect fun openDetached(ciphertext: UByteArray, tag: UByteArray, nonce: UByteArray, sendersPublicKey: UByteArray, recipientsSecretKey: UByteArray): UByteArray

The crypto_box_open_detached() function verifies and decrypts an encrypted message c whose length is clen using the recipient's secret key sk and the sender's public key pk. clen doesn't include the tag, so this length is the same as the plaintext. The plaintext is put into m after verifying that mac is a valid authentication tag for this ciphertext, with the given nonce n and key k. The function throws BoxCorruptedOrTamperedDataException if the verification fails.

actual fun openDetached(ciphertext: UByteArray, tag: UByteArray, nonce: UByteArray, sendersPublicKey: UByteArray, recipientsSecretKey: UByteArray): UByteArray

The crypto_box_open_detached() function verifies and decrypts an encrypted message c whose length is clen using the recipient's secret key sk and the sender's public key pk. clen doesn't include the tag, so this length is the same as the plaintext. The plaintext is put into m after verifying that mac is a valid authentication tag for this ciphertext, with the given nonce n and key k. The function throws BoxCorruptedOrTamperedDataException if the verification fails.

actual fun openDetached(ciphertext: UByteArray, tag: UByteArray, nonce: UByteArray, sendersPublicKey: UByteArray, recipientsSecretKey: UByteArray): UByteArray

The crypto_box_open_detached() function verifies and decrypts an encrypted message c whose length is clen using the recipient's secret key sk and the sender's public key pk. clen doesn't include the tag, so this length is the same as the plaintext. The plaintext is put into m after verifying that mac is a valid authentication tag for this ciphertext, with the given nonce n and key k. The function throws BoxCorruptedOrTamperedDataException if the verification fails.