mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-18 19:48:44 +02:00

committed by
Aleksandar Fabijanic

parent
f2bb0570c9
commit
1e4ee012a2
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/SHA1Engine.h"
|
#include "Poco/SHA1Engine.h"
|
||||||
|
#include "Poco/ByteOrder.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
|
||||||
@@ -50,8 +51,7 @@ inline void SHA1Engine::byteReverse(UInt32* buffer, int byteCount)
|
|||||||
byteCount /= sizeof(UInt32);
|
byteCount /= sizeof(UInt32);
|
||||||
for(int count = 0; count < byteCount; count++)
|
for(int count = 0; count < byteCount; count++)
|
||||||
{
|
{
|
||||||
UInt32 value = (buffer[ count ] << 16) | (buffer[ count ] >> 16);
|
buffer[count] = Poco::ByteOrder::toBigEndian(buffer[ count ]);
|
||||||
buffer[count] = ((value & 0xFF00FF00L) >> 8) | ((value & 0x00FF00FFL) << 8);
|
|
||||||
}
|
}
|
||||||
#endif // POCO_ARCH_LITTLE_ENDIAN
|
#endif // POCO_ARCH_LITTLE_ENDIAN
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user