2021-07-01 09:18:42 +00:00
|
|
|
/***
|
|
|
|
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
|
2022-02-18 10:46:51 +00:00
|
|
|
struct IRSAPrivate
|
2021-07-01 09:18:42 +00:00
|
|
|
{
|
2021-09-21 01:54:47 +00:00
|
|
|
virtual bool Sign(const Memory::MemoryViewRead &payload,
|
2022-09-25 09:56:03 +00:00
|
|
|
Aurora::Hashing::EHashType method,
|
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
|
|
|
|
2021-09-21 01:54:47 +00:00
|
|
|
virtual bool Decrypt(const Memory::MemoryViewRead &payload,
|
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
|
|
|
|
|
|
|
virtual AuSPtr<IRSAPublic> ToPublic() = 0;
|
|
|
|
|
2022-01-20 16:04:53 +00:00
|
|
|
virtual bool ToKey(const RSAMeta &meta, Memory::ByteBuffer &out) = 0;
|
2021-07-01 09:18:42 +00:00
|
|
|
};
|
|
|
|
}
|