encryptDataWithAES256

Method used to encrypt a relatively small array of bytes using the AES256 encryption algorithm

Return

the final EncryptedData, on which the first 16 bytes belong to the initialisation vector

Parameters

data

the PlainData that needs to be encrypted

key

the symmetric secret AES256Key that will be used for the encryption

See also

Throws

IllegalArgumentException

if key is not exactly 32 bytes

expect fun encryptDataWithAES256(data: PlainData, key: AES256Key = generateRandomAES256Key()): EncryptedData

Method used to encrypt a relatively small array of bytes using the AES256 encryption algorithm

Return

the final EncryptedData, on which the first 16 bytes belong to the initialisation vector

Parameters

data

the PlainData that needs to be encrypted

key

the symmetric secret AES256Key that will be used for the encryption

See also

Throws

IllegalArgumentException

if key is not exactly 32 bytes

Method used to encrypt a relatively small array of bytes using the AES256 encryption algorithm

Return

the final EncryptedData, on which the first 16 bytes belong to the initialisation vector

Parameters

data

the PlainData that needs to be encrypted

key

the symmetric secret AES256Key that will be used for the encryption

See also

Throws

IllegalArgumentException

if key is not exactly 32 bytes

Method used to encrypt a relatively small array of bytes using the AES256 encryption algorithm

Return

the final EncryptedData, on which the first 16 bytes belong to the initialisation vector

Parameters

data

the PlainData that needs to be encrypted

key

the symmetric secret AES256Key that will be used for the encryption

See also

Throws

IllegalArgumentException

if key is not exactly 32 bytes