28 lines
815 B
C++
28 lines
815 B
C++
/***
|
|
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
|
|
struct IRSAPrivate
|
|
{
|
|
virtual bool Sign(const Memory::MemoryViewRead &payload,
|
|
EHashType method,
|
|
EPaddingType type,
|
|
Memory::ByteBuffer &out) = 0;
|
|
|
|
virtual bool Decrypt(const Memory::MemoryViewRead &payload,
|
|
EPaddingType type,
|
|
Memory::ByteBuffer &out) = 0;
|
|
|
|
virtual AuSPtr<IRSAPublic> ToPublic() = 0;
|
|
|
|
virtual bool ToKey(const RSAMeta &meta, Memory::ByteBuffer &out) = 0;
|
|
};
|
|
} |