Sync with Upstream master
commit
0fcfd38309
|
|
@ -22,6 +22,7 @@ image:
|
|||
- Visual Studio 2015
|
||||
- Visual Studio 2013
|
||||
|
||||
# Disable build through solution file
|
||||
build: off
|
||||
|
||||
# Extra copy gyrations due to broken MSbuild. Run 'make appveyor' to update the vcxproj files. Also see
|
||||
|
|
@ -41,10 +42,6 @@ test_script:
|
|||
|
||||
cryptest.exe tv all
|
||||
|
||||
# Right now, we have a few failures that we don't know how to workaround.
|
||||
# - https://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
|
||||
# - https://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor
|
||||
|
||||
notifications:
|
||||
- provider: Email
|
||||
to:
|
||||
|
|
|
|||
13
mdc.h
13
mdc.h
|
|
@ -39,13 +39,12 @@ class MDC : public MDC_Info<H>
|
|||
{
|
||||
CRYPTOPP_UNUSED(params);
|
||||
this->AssertValidKeyLength(length);
|
||||
memcpy_s(m_key, m_key.size(), userKey, this->KEYLENGTH);
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, Key(), Key(), this->KEYLENGTH);
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, Key(), reinterpret_cast<const HashWordType*>(userKey), this->KEYLENGTH);
|
||||
}
|
||||
|
||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, Buffer(), (HashWordType *)inBlock, this->BLOCKSIZE);
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, Buffer(), reinterpret_cast<const HashWordType*>(inBlock), this->BLOCKSIZE);
|
||||
H::Transform(Buffer(), Key());
|
||||
|
||||
if (xorBlock)
|
||||
|
|
@ -55,7 +54,7 @@ class MDC : public MDC_Info<H>
|
|||
}
|
||||
else
|
||||
{
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, (HashWordType *)outBlock, Buffer(), this->BLOCKSIZE);
|
||||
ConditionalByteReverse(BIG_ENDIAN_ORDER, reinterpret_cast<HashWordType*>(outBlock), Buffer(), this->BLOCKSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,9 +63,9 @@ class MDC : public MDC_Info<H>
|
|||
unsigned int OptimalDataAlignment() const {return sizeof(HashWordType);}
|
||||
|
||||
private:
|
||||
HashWordType *Key() {return (HashWordType *)m_key.data();}
|
||||
const HashWordType *Key() const {return (const HashWordType *)m_key.data();}
|
||||
HashWordType *Buffer() const {return (HashWordType *)m_buffer.data();}
|
||||
HashWordType *Key() {return reinterpret_cast<HashWordType*>(m_key.data());}
|
||||
const HashWordType *Key() const {return reinterpret_cast<const HashWordType*>(m_key.data());}
|
||||
HashWordType *Buffer() const {return reinterpret_cast<HashWordType*>(m_buffer.data());}
|
||||
|
||||
// VC60 workaround: bug triggered if using FixedSizeAllocatorWithCleanup
|
||||
FixedSizeSecBlock<byte, MDC_Info<H>::KEYLENGTH, AllocatorWithCleanup<byte> > m_key;
|
||||
|
|
|
|||
Loading…
Reference in New Issue