aria/camellia/des: guard setkey_dec by CIPHER_ENCRYPT_ONLY
This is a pre-step to remove *setkey_dec_func in cipher_wrap ctx
when CIPHER_ENCRYPT_ONLY is enabled.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/include/mbedtls/aria.h b/include/mbedtls/aria.h
index 7e55df7..e725ea0 100644
--- a/include/mbedtls/aria.h
+++ b/include/mbedtls/aria.h
@@ -110,6 +110,7 @@
const unsigned char *key,
unsigned int keybits);
+#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
/**
* \brief This function sets the decryption key.
*
@@ -128,6 +129,7 @@
int mbedtls_aria_setkey_dec(mbedtls_aria_context *ctx,
const unsigned char *key,
unsigned int keybits);
+#endif /* !MBEDTLS_CIPHER_ENCRYPT_ONLY */
/**
* \brief This function performs an ARIA single-block encryption or