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

38 lines
998 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: RSAPrivate.hpp
Date: 2021-6-12
Author: Reece
***/
#pragma once
namespace Aurora::Crypto::RSA
{
class PrivateRSA : public IRSAPrivate
{
public:
PrivateRSA(rsa_key &key);
~PrivateRSA();
bool Sign(const void *buffer, AuUInt length,
EHashType method, EPaddingType type,
AuList<AuUInt8> &out) override;
bool Sign(const AuList<AuUInt8> &in,
EHashType method, EPaddingType type,
AuList<AuUInt8> &out) override;
bool Decrypt(const void *buffer, AuUInt length, EPaddingType type, AuList<AuUInt8> &out) override;
bool Decrypt(const AuList<AuUInt8> &in, EPaddingType type, AuList<AuUInt8> &out) override;
AuSPtr<IRSAPublic> ToPublic() override;
bool ToKey(const RSAMeta &meta, AuList<AuUInt8> &out) override;
private:
rsa_key key_;
};
}