AuroraRuntime/Source/Crypto/ECC/PrivateECCImpl.hpp
2021-09-21 02:54:47 +01:00

31 lines
799 B
C++

#pragma once
namespace Aurora::Crypto::ECC
{
class PrivateECCImpl : public IECCPrivate
{
public:
PrivateECCImpl(EECCCurve type, ecc_key &key);
~PrivateECCImpl();
bool Sign(const Memory::MemoryViewRead &plainText,
EHashType method,
AuList<AuUInt8> &out) override;
bool Sign(const Memory::MemoryViewRead &hash,
AuList<AuUInt8> &out) override;
bool ECDH(const AuSPtr<IECCPublic> &partnerPublic,
AuList<AuUInt8> &sharedKey) override;
bool AsPublicECC(AuList<AuUInt8> &out) override;
bool AsPrivateECC(AuList<AuUInt8> &out) override;
EECCCurve GetType() override;
private:
ecc_key _key;
EECCCurve _type;
};
}