AuroraRuntime/Include/Aurora/Crypto/RSA/IRSAPublic.hpp

29 lines
979 B
C++
Raw Normal View History

/***
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 void *buffer, AuUInt length,
const void *sigBuffer, AuUInt sigLength,
EHashType method,
EPaddingType type) = 0;
virtual bool Verify(const AuList<AuUInt8> &buffer, const AuList<AuUInt8> &sig,
EHashType method, EPaddingType type) = 0;
virtual bool Encrypt(const void *buffer, AuUInt length, EPaddingType type, AuList<AuUInt8> &out) = 0;
virtual bool Encrypt(const AuList<AuUInt8> &in, EPaddingType type, AuList<AuUInt8> &out) = 0;
virtual bool ToKey(ERSAKeyType type, AuList<AuUInt8> &out) = 0;
};
}