27 lines
791 B
C++
27 lines
791 B
C++
/***
|
|
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:
|
|
virtual bool Verify(const Memory::MemoryViewRead & payload,
|
|
const Memory::MemoryViewRead & signature,
|
|
EHashType method,
|
|
EPaddingType type) = 0;
|
|
|
|
virtual bool Encrypt(const Memory::MemoryViewRead & plainText,
|
|
EPaddingType type,
|
|
AuList<AuUInt8> &out) = 0;
|
|
|
|
virtual bool ToKey(ERSAKeyType type, AuList<AuUInt8> &out) = 0;
|
|
};
|
|
} |