Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Crypto/MyAes.h')
-rwxr-xr-xCPP/7zip/Crypto/MyAes.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/CPP/7zip/Crypto/MyAes.h b/CPP/7zip/Crypto/MyAes.h
index 24e90d6f..60b13845 100755
--- a/CPP/7zip/Crypto/MyAes.h
+++ b/CPP/7zip/Crypto/MyAes.h
@@ -6,19 +6,23 @@
#include "../../../C/Aes.h"
#include "../../Common/MyCom.h"
-#include "../../Common/Types.h"
#include "../ICoder.h"
namespace NCrypto {
-class CAesCbcEncoder:
+class CAesCbcCoder:
public ICompressFilter,
public ICryptoProperties,
public CMyUnknownImp
{
- CAesCbc Aes;
+protected:
+ AES_CODE_FUNC _codeFunc;
+ AES_SET_KEY_FUNC _setKeyFunc;
+ unsigned _offset;
+ UInt32 _aes[AES_NUM_IVMRK_WORDS + 3];
public:
+ CAesCbcCoder();
MY_UNKNOWN_IMP1(ICryptoProperties)
STDMETHOD(Init)();
STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
@@ -26,19 +30,8 @@ public:
STDMETHOD(SetInitVector)(const Byte *data, UInt32 size);
};
-class CAesCbcDecoder:
- public ICompressFilter,
- public ICryptoProperties,
- public CMyUnknownImp
-{
- CAesCbc Aes;
-public:
- MY_UNKNOWN_IMP1(ICryptoProperties)
- STDMETHOD(Init)();
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
- STDMETHOD(SetKey)(const Byte *data, UInt32 size);
- STDMETHOD(SetInitVector)(const Byte *data, UInt32 size);
-};
+struct CAesCbcEncoder: public CAesCbcCoder { CAesCbcEncoder(); };
+struct CAesCbcDecoder: public CAesCbcCoder { CAesCbcDecoder(); };
}