mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 19:25:53 +02:00

committed by
Aleksandar Fabijanic

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