Hi Folks !

First of all, I'm sorry to use the mailing list to post bug fixes but as
a Windows programmer it is painful for me to use CVS... My contributions
follow.

Regards,

Francis PALLINI

File modes.h
------------
void BlockOrientedCipherModeBase::ProcessData(byte *outString, const
byte *inString, unsigned int length)
{
        unsigned int s = BlockSize();
        assert(length % s == 0);
        unsigned int alignment = m_cipher->BlockAlignment();
        bool requireAlignedInput = RequireAlignedInput();

        if (IsAlignedOn(outString, alignment))
        {
                if (!requireAlignedInput || IsAlignedOn(inString,
alignment))
                        ProcessBlocks(outString, inString, length / s);
                else
                {
                        memcpy(outString, inString, length);
                        ProcessBlocks(outString, outString, length / s);
                }
        }
        else
        {
                while (length)
                {
                        if (!requireAlignedInput ||
IsAlignedOn(inString, alignment))
                                ProcessBlocks(m_buffer, inString, 1);
                        else
                        {
                                memcpy(m_buffer, inString, s);
                                ProcessBlocks(m_buffer, m_buffer, 1);
                        }
                        memcpy(outString, m_buffer, s);
// --- Added
                        inString += s;
                        outString += s;
// --- End
                        length -= s;
                }
        }
}

File integer.h
--------------
SSE2 instructions make it impossible to profile Crypto++ with Purify, so
allow one to disable SS2 support (added DISABLE_SSE2 macro definition).

#ifdef _M_IX86
#       if ((defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 500)) ||
(defined(__ICL) && (__ICL >= 500)) && defined(DISABLE_SSE2) == 0)
#               define SSE2_INTRINSICS_AVAILABLE
#       elif defined(_MSC_VER)
                // _mm_free seems to be the only way to tell if the
Processor Pack is installed or not
#               include <malloc.h>
#               if (defined(_mm_free) && defined(DISABLE_SSE2) == 0)
#                       define SSE2_INTRINSICS_AVAILABLE
#               endif
#       endif
#endif

Reply via email to