mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 02:11:36 -06:00
Initialer Commit
This commit is contained in:
18
CPP/7zip/Archive/Common/OutStreamWithSha1.cpp
Normal file
18
CPP/7zip/Archive/Common/OutStreamWithSha1.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
// OutStreamWithSha1.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "OutStreamWithSha1.h"
|
||||
|
||||
STDMETHODIMP COutStreamWithSha1::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
HRESULT result = S_OK;
|
||||
if (_stream)
|
||||
result = _stream->Write(data, size, &size);
|
||||
if (_calculate)
|
||||
Sha1_Update(&_sha, (const Byte *)data, size);
|
||||
_size += size;
|
||||
if (processedSize)
|
||||
*processedSize = size;
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user