2021-09-21 01:54:47 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Crypto::ECC
|
|
|
|
{
|
2022-09-25 08:25:33 +00:00
|
|
|
struct PublicECCImpl : IECCPublic
|
2021-09-21 01:54:47 +00:00
|
|
|
{
|
|
|
|
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,
|
2022-09-25 09:56:03 +00:00
|
|
|
Aurora::Hashing::EHashType method) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
2022-01-20 16:04:53 +00:00
|
|
|
bool AsPublicECC(Memory::ByteBuffer &out) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
|
|
|
EECCCurve GetType() override;
|
|
|
|
|
|
|
|
const ecc_key &GetKey();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ecc_key _key;
|
|
|
|
EECCCurve _type;
|
|
|
|
};
|
|
|
|
}
|