Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 1 | /* |
Mate Toth-Pal | 7de74b5 | 2018-02-23 15:46:47 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2018, Arm Limited. All rights reserved. |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __TFM_SST_DEFS_H__ |
| 9 | #define __TFM_SST_DEFS_H__ |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | #include <inttypes.h> |
| 16 | #include <limits.h> |
Marc Moreno Berengue | 7d053a3 | 2018-06-27 18:22:14 +0100 | [diff] [blame] | 17 | #include "psa_sst_api.h" |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 18 | |
Marc Moreno Berengue | 675b6e9 | 2018-06-14 17:31:01 +0100 | [diff] [blame] | 19 | /*! |
Marc Moreno Berengue | 10d0d36 | 2018-06-18 14:15:56 +0100 | [diff] [blame] | 20 | * \struct tfm_sst_token_t |
| 21 | * |
| 22 | * \brief Structure to store the asset's token. |
| 23 | * |
| 24 | */ |
| 25 | struct tfm_sst_token_t { |
| 26 | const uint8_t *token; /*!< Pointer to the asset's token to be used to |
| 27 | * generate the asset key to encrypt and decrypt |
| 28 | * the asset data. This is an optional parameter |
| 29 | * that has to be NULL in case the token is not |
| 30 | * provied. |
| 31 | */ |
| 32 | uint32_t token_size; /*!< Token size. In case the token is not provided |
| 33 | * the token size has to be 0. |
| 34 | */ |
| 35 | }; |
| 36 | |
| 37 | /*! |
Marc Moreno Berengue | 675b6e9 | 2018-06-14 17:31:01 +0100 | [diff] [blame] | 38 | * \struct tfm_sst_buf_t |
| 39 | * |
| 40 | * \brief Structure to store data information to read/write from/to asset. |
| 41 | * |
| 42 | */ |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 43 | struct tfm_sst_buf_t { |
Marc Moreno Berengue | 675b6e9 | 2018-06-14 17:31:01 +0100 | [diff] [blame] | 44 | uint8_t *data; /*!< Address of input/output data */ |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 45 | uint32_t size; /*!< Size of input/output data */ |
| 46 | uint32_t offset; /*!< Offset within asset */ |
| 47 | }; |
| 48 | |
Ashutosh Singh | f4d8867 | 2017-11-29 13:35:43 +0000 | [diff] [blame] | 49 | #ifdef __cplusplus |
| 50 | } |
| 51 | #endif |
| 52 | |
| 53 | #endif /* __TFM_SST_DEFS_H__ */ |