2015-07-08 02:53:39 +00:00
|
|
|
#ifndef __AES_HPP__
|
|
|
|
#define __AES_HPP__
|
|
|
|
|
2017-12-29 07:55:42 +00:00
|
|
|
#include <cstdint>
|
|
|
|
#include <cstdlib>
|
2015-07-08 02:53:39 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2016-03-04 23:00:12 +00:00
|
|
|
namespace athena
|
2015-07-08 02:53:39 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class IAES
|
|
|
|
{
|
|
|
|
public:
|
2015-07-16 02:01:37 +00:00
|
|
|
virtual ~IAES() {}
|
2015-07-08 02:53:39 +00:00
|
|
|
virtual void encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)=0;
|
|
|
|
virtual void decrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outbuf, uint64_t len)=0;
|
|
|
|
virtual void setKey(const uint8_t* key)=0;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr<IAES> NewAES();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //__AES_HPP__
|