Use included crc for crypto++ < 5.6.4

This commit is contained in:
Martin 2019-08-08 20:07:39 +02:00
parent 2c8e291d7c
commit 41fc886500
3 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,9 @@
#ifdef BLOCKALIGN_USE_CRYPTOPP
#include "../cryptoplugin/cryptopp_inc.h"
#include "crc32c-adler.cpp"
#if (CRYPTOPP_VERSION < 564)
#include "crc.cpp"
#endif
#else
#include "crc32c-adler.h"
#include "crc.h"
@ -66,7 +69,7 @@ namespace
const char *input,
size_t length)
{
#ifndef BLOCKALIGN_USE_CRYPTOPP
#if !defined(BLOCKALIGN_USE_CRYPTOPP) || (CRYPTOPP_VERSION < 564)
uint32_t r2 = cryptopp_crc::crc32c_hw(crc, input, length);
#ifndef NDEBUG
uint32_t r1 = crc32c_sw(input, length, crc);

View File

@ -46,8 +46,10 @@
#include CRYPTOPP_INCLUDE_ECCRYPTO
#include CRYPTOPP_INCLUDE_OIDS
#include CRYPTOPP_INCLUDE_DSA
#if (CRYPTOPP_VERSION >= 564)
#include CRYPTOPP_INCLUDE_CRC
#endif
#endif
namespace CryptoPPCompat
{