aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-02-20 19:29:34 +0200
committerMatias Elo <matias.elo@nokia.com>2023-04-12 15:52:37 +0300
commit31f1882ae2386011a5220ece9aec0b3b9d5e3b68 (patch)
tree4f347635a92c4f2a6b5fc16ea261179231874476 /include
parentc919196071d2850e75f3c6cd920845c23acd3377 (diff)
api: crypto: change IV and AAD pointers to pointers to constants
ODP is not supposed to modify the IV and AAD data pointed to by odp_crypto_packet_op_param_t. Change the pointer fields to pointers to constans to make this clear in the API and to make it easier to use the API when IV and AAD are already referred to by pointers to constants. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Anoob Joseph <anoobj@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/crypto_types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/odp/api/spec/crypto_types.h b/include/odp/api/spec/crypto_types.h
index 574f56445..7ddb7b19f 100644
--- a/include/odp/api/spec/crypto_types.h
+++ b/include/odp/api/spec/crypto_types.h
@@ -777,10 +777,10 @@ typedef struct odp_crypto_packet_op_param_t {
odp_crypto_session_t session;
/** IV pointer for cipher */
- uint8_t *cipher_iv_ptr;
+ const uint8_t *cipher_iv_ptr;
/** IV pointer for authentication */
- uint8_t *auth_iv_ptr;
+ const uint8_t *auth_iv_ptr;
/** Offset from start of packet for hash result
*
@@ -808,7 +808,7 @@ typedef struct odp_crypto_packet_op_param_t {
/** Pointer to AAD. AAD length is defined by 'auth_aad_len'
* session parameter.
*/
- uint8_t *aad_ptr;
+ const uint8_t *aad_ptr;
/** Data range to apply cipher */
odp_packet_data_range_t cipher_range;