2018-04-15 02:40:03 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <fnd/types.h>
|
|
|
|
#include <crypto/aes.h>
|
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
|
|
|
namespace hac
|
2018-04-15 02:40:03 +00:00
|
|
|
{
|
|
|
|
class AesKeygen
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
// 1 stage key generation dst = src_key.decrypt(src)
|
|
|
|
static void generateKey(byte_t* dst, const byte_t* src, const byte_t* src_key);
|
|
|
|
// 2 stage key generation dst = (src1_key.decrypt(src1)).decrypt(src2)
|
|
|
|
static void generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src1_key);
|
|
|
|
// 3 stage key generation dst = ((src1_key.decrypt(src1)).decrypt(src2)).decrypt(src3)
|
|
|
|
static void generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src3, const byte_t* src1_key);
|
|
|
|
};
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|
2018-04-15 02:40:03 +00:00
|
|
|
}
|