Uncouple GetAlignment from CRYPTOPP_DISABLE_SOSEMANUK_ASM
The class declaration needs to always include the functions for the platform. The implementation can simply return a different number, and that is hidden from the userpull/548/head
parent
c6c8dd3b32
commit
bdb2db7ac2
|
|
@ -288,10 +288,10 @@ word32 s_sosemanukMulTables[512] = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SOSEMANUK_ASM)
|
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
|
||||||
unsigned int SosemanukPolicy::GetAlignment() const
|
unsigned int SosemanukPolicy::GetAlignment() const
|
||||||
{
|
{
|
||||||
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SOSEMANUK_ASM)
|
#if CRYPTOPP_SSE2_ASM_AVAILABLE
|
||||||
#ifdef __INTEL_COMPILER
|
#ifdef __INTEL_COMPILER
|
||||||
if (HasSSE2() && !IsP4()) // Intel compiler produces faster code for this algorithm on the P4
|
if (HasSSE2() && !IsP4()) // Intel compiler produces faster code for this algorithm on the P4
|
||||||
#else
|
#else
|
||||||
|
|
@ -305,7 +305,7 @@ unsigned int SosemanukPolicy::GetAlignment() const
|
||||||
|
|
||||||
unsigned int SosemanukPolicy::GetOptimalBlockSize() const
|
unsigned int SosemanukPolicy::GetOptimalBlockSize() const
|
||||||
{
|
{
|
||||||
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_SOSEMANUK_ASM)
|
#if CRYPTOPP_SSE2_ASM_AVAILABLE
|
||||||
#ifdef __INTEL_COMPILER
|
#ifdef __INTEL_COMPILER
|
||||||
if (HasSSE2() && !IsP4()) // Intel compiler produces faster code for this algorithm on the P4
|
if (HasSSE2() && !IsP4()) // Intel compiler produces faster code for this algorithm on the P4
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ protected:
|
||||||
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
|
void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
|
||||||
void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
|
void CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length);
|
||||||
bool CipherIsRandomAccess() const {return false;}
|
bool CipherIsRandomAccess() const {return false;}
|
||||||
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SOSEMANUK_ASM)
|
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
|
||||||
unsigned int GetAlignment() const;
|
unsigned int GetAlignment() const;
|
||||||
unsigned int GetOptimalBlockSize() const;
|
unsigned int GetOptimalBlockSize() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue