2017-02-12 10:50:35 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
namespace Common
|
|
|
|
{
|
|
|
|
namespace AES
|
|
|
|
{
|
2017-05-01 15:50:12 +00:00
|
|
|
enum class Mode
|
|
|
|
{
|
|
|
|
Decrypt,
|
|
|
|
Encrypt,
|
|
|
|
};
|
|
|
|
std::vector<u8> DecryptEncrypt(const u8* key, u8* iv, const u8* src, size_t size, Mode mode);
|
|
|
|
|
|
|
|
// Convenience functions
|
2017-02-12 10:50:35 +00:00
|
|
|
std::vector<u8> Decrypt(const u8* key, u8* iv, const u8* src, size_t size);
|
2017-05-01 15:50:12 +00:00
|
|
|
std::vector<u8> Encrypt(const u8* key, u8* iv, const u8* src, size_t size);
|
2017-02-12 10:50:35 +00:00
|
|
|
} // namespace AES
|
|
|
|
} // namespace Common
|