mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Build fixes
This commit is contained in:
parent
4304e597d8
commit
873fc6f837
@ -77,7 +77,7 @@
|
|||||||
#define BSWAP32(x) __builtin_bswap32(x)
|
#define BSWAP32(x) __builtin_bswap32(x)
|
||||||
#define BSWAP64(x) __builtin_bswap64(x)
|
#define BSWAP64(x) __builtin_bswap64(x)
|
||||||
#else
|
#else
|
||||||
#error Please define your platform's byteswap macros!
|
#error Please define your platform byteswap macros!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || defined(__BIG_ENDIAN__)
|
#if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || defined(__BIG_ENDIAN__)
|
||||||
|
@ -11,6 +11,10 @@ bool RandomStateInitialized = false;
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
#define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x); EVP_CIPHER_CTX_init(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
static int addPkcs7PaddingInPlace(unsigned char* plaintext, int plaintextLen) {
|
static int addPkcs7PaddingInPlace(unsigned char* plaintext, int plaintextLen) {
|
||||||
int paddedLength = ROUND_TO_PKCS7_PADDED_LEN(plaintextLen);
|
int paddedLength = ROUND_TO_PKCS7_PADDED_LEN(plaintextLen);
|
||||||
unsigned char paddingByte = (unsigned char)(16 - (plaintextLen % 16));
|
unsigned char paddingByte = (unsigned char)(16 - (plaintextLen % 16));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user