📄 interface.h
字号:
//
// Interface.h
#ifndef _CCryptoInterface__
#define _CCryptoInterface__
#include <e32base.h>
#include <ECom.h>
#include <badesca.h>
// UID of this interface
const TUid KCCryptoInterfaceUid = {0x10008EE0};
class CCryptoInterface : public CBase
{
public:
enum TAlgorithm
{ EDES, E3DES, EAES, ERC2, ERC4 };
// Instantiates a default object of this type
IMPORT_C static CCryptoInterface* NewL();
// Instantiates an object of this type using aCue
IMPORT_C static CCryptoInterface* NewL(const TDesC8& aCue);
// Destructor.
IMPORT_C virtual ~CCryptoInterface();
// List all available implementations which satisfy this given interface
IMPORT_C static void ListImplementationsL(RImplInfoPtrArray& aImplInfoArray);
// Interface methods
virtual void EncryptL(const TDesC8& aPlaintext, const TDesC8& aKey, TDes8& aCiphertext, CCryptoInterface::TAlgorithm aAlg) = 0;
virtual void DecryptL(const TDesC8& aCiphertext, const TDesC8& aKey, TDes8& aPlaintext, CCryptoInterface::TAlgorithm aAlg) = 0;
protected:
IMPORT_C CCryptoInterface();
private:
TUid iDtor_ID_Key; // Identification on cleanup
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -