summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authortyx <[email protected]>2022-04-02 14:23:21 +0800
committerguo <[email protected]>2022-04-06 10:29:05 +0800
commitcceefd5ef99d54d082487f19a1afcd74fbc6e765 (patch)
tree63f3c913f7aa3b903100d78f2ee4edaf2a363ccf /components
parentb80f5815621a57b16671b2c5d64a279835654b99 (diff)
[hwcrypto]Optimize memory usage
Diffstat (limited to 'components')
-rw-r--r--components/drivers/hwcrypto/hw_symmetric.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/drivers/hwcrypto/hw_symmetric.h b/components/drivers/hwcrypto/hw_symmetric.h
index f3f78fb21c..8886119195 100644
--- a/components/drivers/hwcrypto/hw_symmetric.h
+++ b/components/drivers/hwcrypto/hw_symmetric.h
@@ -54,12 +54,12 @@ struct hwcrypto_symmetric_info
struct hwcrypto_symmetric
{
struct rt_hwcrypto_ctx parent; /**< Inheritance from hardware crypto context */
- rt_uint32_t flags; /**< key or iv or ivoff has been changed. The flag will be set up */
- rt_int32_t iv_len; /**< initialization vector effective length */
- rt_int32_t iv_off; /**< The offset in IV */
+ rt_uint16_t flags; /**< key or iv or ivoff has been changed. The flag will be set up */
+ rt_uint16_t iv_len; /**< initialization vector effective length */
+ rt_uint16_t iv_off; /**< The offset in IV */
+ rt_uint16_t key_bitlen; /**< The crypto key bit length */
rt_uint8_t iv[RT_HWCRYPTO_IV_MAX_SIZE]; /**< The initialization vector */
rt_uint8_t key[RT_HWCRYPTO_KEYBIT_MAX_SIZE >> 3]; /**< The crypto key */
- rt_int32_t key_bitlen; /**< The crypto key bit length */
const struct hwcrypto_symmetric_ops *ops; /**< !! Hardware initializes this value when creating context !! */
};