Mercurial > vba-linux
diff src/win32/7zip/7z/CPP/7zip/Crypto/MyAes.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Crypto/MyAes.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,48 @@ 1.4 +// Crypto/MyAes.h 1.5 + 1.6 +#ifndef __CRYPTO_MY_AES_H 1.7 +#define __CRYPTO_MY_AES_H 1.8 + 1.9 +extern "C" 1.10 +{ 1.11 +#include "../../../C/Aes.h" 1.12 +} 1.13 + 1.14 +#include "../../Common/MyCom.h" 1.15 +#include "../../Common/Types.h" 1.16 + 1.17 +#include "../ICoder.h" 1.18 + 1.19 +namespace NCrypto { 1.20 + 1.21 +class CAesCbcEncoder: 1.22 + public ICompressFilter, 1.23 + public ICryptoProperties, 1.24 + public CMyUnknownImp 1.25 +{ 1.26 + CAesCbc Aes; 1.27 +public: 1.28 + MY_UNKNOWN_IMP1(ICryptoProperties) 1.29 + STDMETHOD(Init)(); 1.30 + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); 1.31 + STDMETHOD(SetKey)(const Byte *data, UInt32 size); 1.32 + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size); 1.33 +}; 1.34 + 1.35 +class CAesCbcDecoder: 1.36 + public ICompressFilter, 1.37 + public ICryptoProperties, 1.38 + public CMyUnknownImp 1.39 +{ 1.40 + CAesCbc Aes; 1.41 +public: 1.42 + MY_UNKNOWN_IMP1(ICryptoProperties) 1.43 + STDMETHOD(Init)(); 1.44 + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); 1.45 + STDMETHOD(SetKey)(const Byte *data, UInt32 size); 1.46 + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size); 1.47 +}; 1.48 + 1.49 +} 1.50 + 1.51 +#endif