aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Crypto/ZipCrypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Crypto/ZipCrypto.h')
-rw-r--r--CPP/7zip/Crypto/ZipCrypto.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/CPP/7zip/Crypto/ZipCrypto.h b/CPP/7zip/Crypto/ZipCrypto.h
index d2fe4c4..485470e 100644
--- a/CPP/7zip/Crypto/ZipCrypto.h
+++ b/CPP/7zip/Crypto/ZipCrypto.h
@@ -1,7 +1,7 @@
1// Crypto/ZipCrypto.h 1// Crypto/ZipCrypto.h
2 2
3#ifndef __CRYPTO_ZIP_CRYPTO_H 3#ifndef ZIP7_INC_CRYPTO_ZIP_CRYPTO_H
4#define __CRYPTO_ZIP_CRYPTO_H 4#define ZIP7_INC_CRYPTO_ZIP_CRYPTO_H
5 5
6#include "../../Common/MyCom.h" 6#include "../../Common/MyCom.h"
7 7
@@ -30,6 +30,10 @@ class CCipher:
30 public ICryptoSetPassword, 30 public ICryptoSetPassword,
31 public CMyUnknownImp 31 public CMyUnknownImp
32{ 32{
33 Z7_COM_UNKNOWN_IMP_1(ICryptoSetPassword)
34 Z7_COM7F_IMP(Init())
35public:
36 Z7_IFACE_COM7_IMP(ICryptoSetPassword)
33protected: 37protected:
34 UInt32 Key0; 38 UInt32 Key0;
35 UInt32 Key1; 39 UInt32 Key1;
@@ -47,10 +51,6 @@ protected:
47 } 51 }
48 52
49public: 53public:
50 MY_UNKNOWN_IMP1(ICryptoSetPassword)
51 STDMETHOD(Init)();
52 STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size);
53
54 virtual ~CCipher() 54 virtual ~CCipher()
55 { 55 {
56 Key0 = KeyMem0 = 56 Key0 = KeyMem0 =
@@ -59,18 +59,18 @@ public:
59 } 59 }
60}; 60};
61 61
62class CEncoder: public CCipher 62class CEncoder Z7_final: public CCipher
63{ 63{
64 Z7_COM7F_IMP2(UInt32, Filter(Byte *data, UInt32 size))
64public: 65public:
65 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
66 HRESULT WriteHeader_Check16(ISequentialOutStream *outStream, UInt16 crc); 66 HRESULT WriteHeader_Check16(ISequentialOutStream *outStream, UInt16 crc);
67}; 67};
68 68
69class CDecoder: public CCipher 69class CDecoder Z7_final: public CCipher
70{ 70{
71 Z7_COM7F_IMP2(UInt32, Filter(Byte *data, UInt32 size))
71public: 72public:
72 Byte _header[kHeaderSize]; 73 Byte _header[kHeaderSize];
73 STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size);
74 HRESULT ReadHeader(ISequentialInStream *inStream); 74 HRESULT ReadHeader(ISequentialInStream *inStream);
75 void Init_BeforeDecode(); 75 void Init_BeforeDecode();
76}; 76};