nrfxlib API 0.1.0
|
psa_status_t cc3xx_aead_encrypt | ( | const psa_key_attributes_t * | attributes, |
const uint8_t * | key_buffer, | ||
size_t | key_buffer_size, | ||
psa_algorithm_t | alg, | ||
const uint8_t * | nonce, | ||
size_t | nonce_length, | ||
const uint8_t * | additional_data, | ||
size_t | additional_data_length, | ||
const uint8_t * | plaintext, | ||
size_t | plaintext_length, | ||
uint8_t * | ciphertext, | ||
size_t | ciphertext_size, | ||
size_t * | ciphertext_length | ||
) |
Encrypt and authenticate with an AEAD algorithm in one-shot.
[in] | attributes | Attributes of the key to use |
[in] | key_buffer | Key material buffer |
[in] | key_buffer_size | Size in bytes of the key |
[in] | alg | Algorithm to use |
[in] | nonce | Nonce buffer |
[in] | nonce_length | Size in bytes of the nonce |
[in] | additional_data | Data to authenticate buffer |
[in] | additional_data_length | Size in bytes of additional_data |
[in] | plaintext | Data to encrypt buffer |
[in] | plaintext_length | Size in bytes of the data to encrypt |
[out] | ciphertext | Buffer to hold the encrypted data |
[in] | ciphertext_size | Size in bytes of the ciphertext buffer |
[out] | ciphertext_length | Size in bytes of the encrypted data |
PSA_SUCCESS | on success. Error code from psa_status_t on failure |