mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-10-26 10:32:56 +01:00 
			
		
		
		
	latest changes from main rep
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| // | ||||
| // MD4Engine.cpp | ||||
| // | ||||
| // $Id: //poco/Main/Foundation/src/MD4Engine.cpp#11 $ | ||||
| // $Id: //poco/Main/Foundation/src/MD4Engine.cpp#13 $ | ||||
| // | ||||
| // Library: Foundation | ||||
| // Package: Crypt | ||||
| @@ -58,7 +58,7 @@ | ||||
|  | ||||
|  | ||||
| #include "Poco/MD4Engine.h" | ||||
| #include <string.h> | ||||
| #include <cstring> | ||||
|  | ||||
|  | ||||
| namespace Poco { | ||||
| @@ -95,7 +95,7 @@ void MD4Engine::updateImpl(const void* input_, unsigned inputLen) | ||||
| 	/* Transform as many times as possible. */ | ||||
| 	if (inputLen >= partLen)  | ||||
| 	{ | ||||
| 		memcpy(&_context.buffer[index], input, partLen); | ||||
| 		std::memcpy(&_context.buffer[index], input, partLen); | ||||
| 		transform(_context.state, _context.buffer); | ||||
|  | ||||
| 		for (i = partLen; i + 63 < inputLen; i += 64) | ||||
| @@ -106,7 +106,7 @@ void MD4Engine::updateImpl(const void* input_, unsigned inputLen) | ||||
| 	else i = 0; | ||||
|  | ||||
| 	/* Buffer remaining input */ | ||||
| 	memcpy(&_context.buffer[index], &input[i], inputLen-i); | ||||
| 	std::memcpy(&_context.buffer[index], &input[i], inputLen-i); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -118,7 +118,7 @@ unsigned MD4Engine::digestLength() const | ||||
|  | ||||
| void MD4Engine::reset() | ||||
| { | ||||
| 	memset(&_context, 0, sizeof(_context)); | ||||
| 	std::memset(&_context, 0, sizeof(_context)); | ||||
| 	_context.count[0] = _context.count[1] = 0; | ||||
| 	_context.state[0] = 0x67452301; | ||||
| 	_context.state[1] = 0xefcdab89; | ||||
| @@ -156,7 +156,7 @@ const DigestEngine::Digest& MD4Engine::digest() | ||||
| 	_digest.insert(_digest.begin(), digest, digest + sizeof(digest)); | ||||
|  | ||||
| 	/* Zeroize sensitive information. */ | ||||
| 	memset(&_context, 0, sizeof (_context)); | ||||
| 	std::memset(&_context, 0, sizeof (_context)); | ||||
| 	reset(); | ||||
| 	return _digest; | ||||
| } | ||||
| @@ -269,7 +269,7 @@ void MD4Engine::transform (UInt32 state[4], const unsigned char block[64]) | ||||
| 	state[3] += d; | ||||
|  | ||||
| 	/* Zeroize sensitive information. */ | ||||
| 	memset(x, 0, sizeof(x)); | ||||
| 	std::memset(x, 0, sizeof(x)); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Guenter Obiltschnig
					Guenter Obiltschnig