blob: 2e99f158d5d15f0994e7ae08a5b086b8a4598484 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Crypto/AES/MyAES.h
#ifndef __CIPHER_MYAES_H
#define __CIPHER_MYAES_H
#include "Common/Types.h"
#include "Common/MyCom.h"
#include "../../ICoder.h"
extern "C"
{
#include "../../../../C/Aes.h"
}
namespace NCrypto {
class CAesCbcEncoder:
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);
};
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);
};
}
#endif
|