mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
cipher_wrap: remove *setkey_dec_func in CIPHER_ENCRYPT_ONLY
There is no need to set decrypt key under CIPHER_ENCRYPT_ONLY, so we can remove *setkey_dec_func from ctx to save extra code size. Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
@@ -93,9 +93,11 @@ struct mbedtls_cipher_base_t {
|
||||
int (*setkey_enc_func)(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen);
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
/** Set key for decryption purposes */
|
||||
int (*setkey_dec_func)(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen);
|
||||
#endif
|
||||
|
||||
/** Allocate a new context */
|
||||
void * (*ctx_alloc_func)(void);
|
||||
|
Reference in New Issue
Block a user