summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h')
-rw-r--r--src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h b/src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h
new file mode 100644
index 000000000..60b13845f
--- /dev/null
+++ b/src/libs/7zip/win/CPP/7zip/Crypto/MyAes.h
@@ -0,0 +1,38 @@
+// Crypto/MyAes.h
+
+#ifndef __CRYPTO_MY_AES_H
+#define __CRYPTO_MY_AES_H
+
+#include "../../../C/Aes.h"
+
+#include "../../Common/MyCom.h"
+
+#include "../ICoder.h"
+
+namespace NCrypto {
+
+class CAesCbcCoder:
+ public ICompressFilter,
+ public ICryptoProperties,
+ public CMyUnknownImp
+{
+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);
+ STDMETHOD(SetKey)(const Byte *data, UInt32 size);
+ STDMETHOD(SetInitVector)(const Byte *data, UInt32 size);
+};
+
+struct CAesCbcEncoder: public CAesCbcCoder { CAesCbcEncoder(); };
+struct CAesCbcDecoder: public CAesCbcCoder { CAesCbcDecoder(); };
+
+}
+
+#endif