2021-07-01 09:18:42 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: IRSAPublic.hpp
|
|
|
|
Date: 2021-7-1
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Crypto::RSA
|
|
|
|
{
|
|
|
|
// Rememeber: there is no such thing as public decryption
|
|
|
|
class IRSAPublic
|
|
|
|
{
|
|
|
|
public:
|
2021-09-21 01:54:47 +00:00
|
|
|
virtual bool Verify(const Memory::MemoryViewRead &plainText,
|
|
|
|
const Memory::MemoryViewRead &signature,
|
2021-07-01 09:18:42 +00:00
|
|
|
EHashType method,
|
|
|
|
EPaddingType type) = 0;
|
|
|
|
|
2021-09-21 01:54:47 +00:00
|
|
|
virtual bool Encrypt(const Memory::MemoryViewRead &plainText,
|
2021-09-14 23:56:26 +00:00
|
|
|
EPaddingType type,
|
2022-01-20 16:04:53 +00:00
|
|
|
Memory::ByteBuffer &out) = 0;
|
2021-07-01 09:18:42 +00:00
|
|
|
|
2022-01-20 16:04:53 +00:00
|
|
|
virtual bool ToKey(ERSAKeyType type, Memory::ByteBuffer &out) = 0;
|
2021-07-01 09:18:42 +00:00
|
|
|
};
|
|
|
|
}
|