AuroraRuntime/Include/Aurora/Crypto/RSA/IRSAPrivate.hpp
Reece 9a93d4ec8d [+] Added the old RSA wrappers
[*] Prepare for implementing ECC (again)
2021-07-01 10:18:42 +01:00

30 lines
1002 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
class IRSAPrivate
{
public:
virtual bool Sign(const void *buffer, AuUInt length,
EHashType method, EPaddingType type,
AuList<AuUInt8> &out) = 0;
virtual bool Sign(const AuList<AuUInt8> &in,
EHashType method, EPaddingType type,
AuList<AuUInt8> &out) = 0;
virtual bool Decrypt(const void *buffer, AuUInt length, EPaddingType type, AuList<AuUInt8> &out) = 0;
virtual bool Decrypt(const AuList<AuUInt8> &in, EPaddingType type, AuList<AuUInt8> &out) = 0;
virtual AuSPtr<IRSAPublic> ToPublic() = 0;
virtual bool ToKey(const RSAMeta &meta, AuList<AuUInt8> &out) = 0;
};
}