tuweni / org.apache.tuweni.crypto.sodium / Box / decryptDetached

decryptDetached

@Nullable fun decryptDetached(cipherText: Bytes!, mac: Bytes!, nonce: Nonce!): Bytes? (source)

Decrypt a message using a detached message authentication code.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

mac - Bytes!: The message authentication code.

nonce - Nonce!: The nonce that was used for encryption.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable fun decryptDetached(cipherText: ByteArray!, mac: ByteArray!, nonce: Nonce!): ByteArray? (source)

Decrypt a message using a detached message authentication code.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

mac - ByteArray!: The message authentication code.

nonce - Nonce!: The nonce that was used for encryption.

Return
ByteArray?: The decrypted data, or null if verification failed.

@Nullable static fun decryptDetached(cipherText: Bytes!, mac: Bytes!, sender: PublicKey!, receiver: SecretKey!, nonce: Nonce!): Bytes? (source)

Decrypt a message using a given key and a detached message authentication code.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

mac - Bytes!: The message authentication code.

sender - PublicKey!: The public key of the sender.

receiver - SecretKey!: The secret key of the receiver.

nonce - Nonce!: The nonce that was used for encryption.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable static fun decryptDetached(cipherText: ByteArray!, mac: ByteArray!, sender: PublicKey!, receiver: SecretKey!, nonce: Nonce!): ByteArray? (source)

Decrypt a message using a given key and a detached message authentication code.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

mac - ByteArray!: The message authentication code.

sender - PublicKey!: The public key of the sender.

receiver - SecretKey!: The secret key of the receiver.

nonce - Nonce!: The nonce that was used for encryption.

Return
ByteArray?: The decrypted data, or null if verification failed.