增加编译控制选项

This commit is contained in:
Simon
2021-07-17 08:56:42 -07:00
parent 4159e6ddf5
commit 5dfd357e16
9 changed files with 78 additions and 4 deletions

View File

@@ -46,6 +46,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NO_AES
#ifndef GMSSL_AES_H
#define GMSSL_AES_H
@@ -89,3 +90,4 @@ void aes_decrypt(const AES_KEY *aes_key, const uint8_t in[AES_BLOCK_SIZE], uint8
}
#endif
#endif
#endif

View File

@@ -46,6 +46,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NO_CHACHA20
/* RFC 8439 "ChaCha20 and Poly1305 for IETF Protocols" */
#ifndef GMSSL_CHACHA20_H
@@ -95,3 +97,4 @@ void chacha20_generate_keystream(CHACHA20_STATE *state,
}
#endif
#endif
#endif

View File

@@ -46,6 +46,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NO_DES
/* FIPS PUB 46-3 "Data Encryption Standard (DES)" */
#ifndef GMSSL_DES_H
@@ -93,3 +95,4 @@ void des_ede_encrypt(DES_EDE_KEY *key, const unsigned char in[8], unsigned char
}
#endif
#endif
#endif

View File

@@ -46,6 +46,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NO_RC4
#ifndef GMSSL_RC4_H
#define GMSSL_RC4_H
@@ -74,3 +75,5 @@ void rc4_generate_keystream(RC4_STATE *state, size_t outlen, uint8_t *out);
}
#endif
#endif
#endif