Make AES optional and remove "Public API" from headers

This commit is contained in:
Zhi Guan
2023-12-17 16:52:42 +08:00
parent 04cbd81651
commit dc4c21f4ec
14 changed files with 42 additions and 244 deletions

View File

@@ -25,8 +25,6 @@ set(src
src/sm9_lib.c
src/zuc.c
src/zuc_modes.c
src/aes.c
src/aes_modes.c
src/hash_drbg.c
src/block_cipher.c
src/digest.c
@@ -123,7 +121,6 @@ set(tests
sm2
sm9
zuc
aes
hash_drbg
block_cipher
digest
@@ -304,6 +301,14 @@ if (ENABLE_SHA2)
endif()
option(ENABLE_AES "Enable AES" ON)
if (ENABLE_AES)
message(STATUS "ENABLE_AES is ON")
list(APPEND src src/aes.c src/aes_modes.c)
list(APPEND tests aes)
endif()
option(ENABLE_CHACHA20 "Enable Chacha20" OFF)
if (ENABLE_CHACHA20)
message(STATUS "ENABLE_CHACHA20 is ON")