Add implementation of psa_crypto_copy_output()

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2023-10-30 20:37:12 +00:00
parent 2f96423147
commit 8978f5c32a

View File

@ -8454,4 +8454,14 @@ psa_status_t psa_crypto_copy_input(const uint8_t *input, size_t input_len,
return PSA_SUCCESS;
}
psa_status_t psa_crypto_copy_output(const uint8_t *output_copy, size_t output_copy_len,
uint8_t *output, size_t output_len)
{
if (output_len < output_copy_len) {
return PSA_ERROR_BUFFER_TOO_SMALL;
}
memcpy(output, output_copy, output_copy_len);
return PSA_SUCCESS;
}
#endif /* MBEDTLS_PSA_CRYPTO_C */