mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-31 18:32:57 +00:00
Add implementation of psa_crypto_copy_output()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
2f96423147
commit
8978f5c32a
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user