diff options
Diffstat (limited to 'core/fdrm/crypto')
-rw-r--r-- | core/fdrm/crypto/fx_crypt.cpp | 16 | ||||
-rw-r--r-- | core/fdrm/crypto/fx_crypt.h | 10 | ||||
-rw-r--r-- | core/fdrm/crypto/fx_crypt_aes.cpp | 2 | ||||
-rw-r--r-- | core/fdrm/crypto/fx_crypt_sha.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/core/fdrm/crypto/fx_crypt.cpp b/core/fdrm/crypto/fx_crypt.cpp index 885b468839..12b955d93d 100644 --- a/core/fdrm/crypto/fx_crypt.cpp +++ b/core/fdrm/crypto/fx_crypt.cpp @@ -245,14 +245,14 @@ void CRYPT_MD5Generate(const uint8_t* input, CRYPT_MD5Update(&ctx, input, length); CRYPT_MD5Finish(&ctx, digest); } -static FX_BOOL (*g_PubKeyDecryptor)(const uint8_t* pData, - uint32_t size, - uint8_t* data_buf, - uint32_t& data_len) = nullptr; -void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(const uint8_t* pData, - uint32_t size, - uint8_t* data_buf, - uint32_t& data_len)) { +static bool (*g_PubKeyDecryptor)(const uint8_t* pData, + uint32_t size, + uint8_t* data_buf, + uint32_t& data_len) = nullptr; +void CRYPT_SetPubKeyDecryptor(bool (*func)(const uint8_t* pData, + uint32_t size, + uint8_t* data_buf, + uint32_t& data_len)) { g_PubKeyDecryptor = func; } #ifdef __cplusplus diff --git a/core/fdrm/crypto/fx_crypt.h b/core/fdrm/crypto/fx_crypt.h index 75cab89435..24650bec9a 100644 --- a/core/fdrm/crypto/fx_crypt.h +++ b/core/fdrm/crypto/fx_crypt.h @@ -23,7 +23,7 @@ void CRYPT_AESSetKey(void* context, uint32_t blocklen, const uint8_t* key, uint32_t keylen, - FX_BOOL bEncrypt); + bool bEncrypt); void CRYPT_AESSetIV(void* context, const uint8_t* iv); void CRYPT_AESDecrypt(void* context, uint8_t* dest, @@ -59,10 +59,10 @@ void CRYPT_SHA512Finish(void* context, uint8_t digest[64]); void CRYPT_SHA512Generate(const uint8_t* data, uint32_t size, uint8_t digest[64]); -void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(const uint8_t* pData, - uint32_t size, - uint8_t* data_buf, - uint32_t& data_len)); +void CRYPT_SetPubKeyDecryptor(bool (*func)(const uint8_t* pData, + uint32_t size, + uint8_t* data_buf, + uint32_t& data_len)); #ifdef __cplusplus }; diff --git a/core/fdrm/crypto/fx_crypt_aes.cpp b/core/fdrm/crypto/fx_crypt_aes.cpp index 27c064e19f..8484b6f4a5 100644 --- a/core/fdrm/crypto/fx_crypt_aes.cpp +++ b/core/fdrm/crypto/fx_crypt_aes.cpp @@ -807,7 +807,7 @@ void CRYPT_AESSetKey(void* context, uint32_t blocklen, const uint8_t* key, uint32_t keylen, - FX_BOOL bEncrypt) { + bool bEncrypt) { aes_setup((AESContext*)context, blocklen, key, keylen); } void CRYPT_AESSetIV(void* context, const uint8_t* iv) { diff --git a/core/fdrm/crypto/fx_crypt_sha.cpp b/core/fdrm/crypto/fx_crypt_sha.cpp index eb3373cfb0..5fb45ab66a 100644 --- a/core/fdrm/crypto/fx_crypt_sha.cpp +++ b/core/fdrm/crypto/fx_crypt_sha.cpp @@ -384,7 +384,7 @@ uint64_t FX_ato64i(const FX_CHAR* str) { } else if (str[i] >= 'A' && str[i] <= 'F') { ret |= (str[i] - 'A' + 10) & 0xFF; } else { - ASSERT(FALSE); + ASSERT(false); } } return ret; |