This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions

View File

@@ -6,6 +6,7 @@
#include "Common/MyCom.h"
#include "../../ICoder.h"
#include "../../IPassword.h"
#include "../../Archive/Common/CoderLoader.h"
#include "Common/Types.h"
#include "Common/Buffer.h"
@@ -14,31 +15,37 @@ namespace NCrypto {
namespace NRar29 {
class CDecoder:
public ICompressCoder,
public ICompressSetDecoderProperties,
public ICompressFilter,
public ICompressSetDecoderProperties2,
public ICryptoSetPassword,
public CMyUnknownImp
{
BYTE _salt[8];
Byte _salt[8];
bool _thereIsSalt;
CByteBuffer buffer;
BYTE aesKey[16];
BYTE aesInit[16];
Byte aesKey[16];
Byte aesInit[16];
bool _needCalculate;
CCoderLibrary _aesLib;
CMyComPtr<ICompressFilter> _aesFilter;
void Calculate();
HRESULT CreateFilter();
public:
MY_UNKNOWN_IMP2(
ICryptoSetPassword,
ICompressSetDecoderProperties)
ICompressSetDecoderProperties2)
STDMETHOD(Code)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, UINT64 const *inSize,
const UINT64 *outSize,ICompressProgressInfo *progress);
STDMETHOD(Init)();
STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
STDMETHOD(CryptoSetPassword)(const BYTE *aData, UINT32 aSize);
STDMETHOD(CryptoSetPassword)(const Byte *aData, UInt32 aSize);
// ICompressSetDecoderProperties
STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
CDecoder();
};