1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Add implementation of psa_crypto_copy_input()

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2023-10-30 20:29:43 +00:00
parent b0a01b18af
commit 957f980379

View File

@ -5523,4 +5523,16 @@ exit:
return status; return status;
} }
psa_status_t psa_crypto_copy_input(const uint8_t *input, size_t input_len,
uint8_t *input_copy, size_t input_copy_len)
{
if (input_len > input_copy_len) {
return PSA_ERROR_BUFFER_TOO_SMALL;
}
memcpy(input_copy, input, input_len);
return PSA_SUCCESS;
}
#endif /* MBEDTLS_PSA_CRYPTO_C */ #endif /* MBEDTLS_PSA_CRYPTO_C */