34 lines
885 B
C++
34 lines
885 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ECCx25519Public.hpp
|
|
Date: 2021-9-17
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Crypto::ECC
|
|
{
|
|
struct PublicCurve25519Impl : IECCPublic
|
|
{
|
|
PublicCurve25519Impl(bool isX25519, curve25519_key &&key);
|
|
~PublicCurve25519Impl();
|
|
|
|
bool Verify(const Memory::MemoryViewRead &hash,
|
|
const Memory::MemoryViewRead &signature) override;
|
|
|
|
bool Verify(const Memory::MemoryViewRead &plaintext,
|
|
const Memory::MemoryViewRead &signature,
|
|
Aurora::Hashing::EHashType method) override;
|
|
|
|
bool AsPublicECC(Memory::ByteBuffer &out) override;
|
|
|
|
EECCCurve GetType() override;
|
|
|
|
const curve25519_key &GetKey();
|
|
|
|
private:
|
|
curve25519_key key_;
|
|
bool bIsX25519_;
|
|
};
|
|
} |