encrypt
fun encrypt(data: ByteArray, key: ByteArray, nonce: ByteArray, additionalData: ByteArray? = null, micSize: Int): ByteArray
Encrypts the data with the EncryptionKey , Nonce and concatenates the MIC(Message Integrity Check).
Parameters
data
Data to be encrypted.
key
128-bit key.
nonce
104-bit nonce.
micSize
Length of the MIC to be generated, in bytes.
additionalData
Additional data to be authenticated.