2018-10-07 03:37:09 +00:00
|
|
|
#pragma once
|
2015-07-08 02:53:39 +00:00
|
|
|
|
2017-12-29 07:55:42 +00:00
|
|
|
#include <cstdint>
|
|
|
|
#include <cstdlib>
|
2015-07-08 02:53:39 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
namespace athena {
|
2015-07-08 02:53:39 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
class IAES {
|
2015-07-08 02:53:39 +00:00
|
|
|
public:
|
2018-12-08 05:18:17 +00:00
|
|
|
virtual ~IAES() {}
|
|
|
|
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;
|
2015-07-08 02:53:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr<IAES> NewAES();
|
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
} // namespace athena
|