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

31 lines
735 B
C++

#pragma once
namespace Aurora::Crypto::ECC
{
class PublicECCImpl : public IECCPublic
{
public:
PublicECCImpl(EECCCurve type, ecc_key &key);
~PublicECCImpl();
bool Verify(const Memory::MemoryViewRead &hash,
const Memory::MemoryViewRead &signature) override;
bool Verify(const Memory::MemoryViewRead &plaintext,
const Memory::MemoryViewRead &signature,
EHashType method) override;
bool AsPublicECC(AuList<AuUInt8> &out) override;
bool Export(bool pub, DerBuffer &out);
EECCCurve GetType() override;
const ecc_key &GetKey();
private:
ecc_key _key;
EECCCurve _type;
};
}