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

29 lines
817 B
C++
Raw Normal View History

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IRSAPrivate.hpp
Date: 2021-7-1
Author: Reece
***/
#pragma once
namespace Aurora::Crypto::RSA
{
// Remember: there is no such thing as private encryption
class IRSAPrivate
{
public:
2021-09-21 01:54:47 +00:00
virtual bool Sign(const Memory::MemoryViewRead &payload,
EHashType method,
EPaddingType type,
AuList<AuUInt8> &out) = 0;
2021-09-21 01:54:47 +00:00
virtual bool Decrypt(const Memory::MemoryViewRead &payload,
EPaddingType type,
AuList<AuUInt8> &out) = 0;
virtual AuSPtr<IRSAPublic> ToPublic() = 0;
virtual bool ToKey(const RSAMeta &meta, AuList<AuUInt8> &out) = 0;
};
}