#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_asymmetric.h>
Encrypt a message using an asymmetric key.
- Parameters
-
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material buffer. |
| [in] | key_buffer_size | Size of the key buffer in bytes. |
| [in] | alg | Encryption algorithm. |
| [in] | input | Plaintext to encrypt. |
| [in] | input_length | Length of the plaintext in bytes. |
| [in] | salt | Optional salt. |
| [in] | salt_length | Length of the salt in bytes. |
| [out] | output | Buffer to store the ciphertext. |
| [in] | output_size | Size of the output buffer in bytes. |
| [out] | output_length | Length of the generated ciphertext in bytes. |
- Return values
-
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_INVALID_HANDLE | The key handle is invalid. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm is not supported. |
| PSA_ERROR_BUFFER_TOO_SMALL | The output buffer is too small. |