mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 08:56:17 +08:00
增加编译控制选项
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NO_AES
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -478,3 +479,4 @@ void aes_decrypt(const AES_KEY *aes_key, const uint8_t in[16], uint8_t out[16])
|
||||
|
||||
memset(state, 0, sizeof(state));
|
||||
}
|
||||
#endif
|
||||
@@ -46,6 +46,7 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef NO_CHACHA20
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -121,3 +122,4 @@ void chacha20_generate_keystream(CHACHA20_STATE *state, unsigned int counts, uns
|
||||
state->d[12]++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -46,6 +46,8 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef NO_DES
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -265,3 +267,4 @@ void des_encrypt(DES_KEY *key, const unsigned char in[DES_BLOCK_SIZE],
|
||||
|
||||
PUTU64(out, T);
|
||||
}
|
||||
#endif
|
||||
@@ -45,10 +45,13 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef NO_RC4
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#include <gmssl/rc4.h>
|
||||
|
||||
void rc4_set_key(RC4_STATE *state, const unsigned char *key, size_t keylen)
|
||||
@@ -115,3 +118,5 @@ unsigned char rc4_generate_keybyte(RC4_STATE *state)
|
||||
rc4_generate_keystream(state, 1, out);
|
||||
return out[0];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user