31 lines
814 B
C++
31 lines
814 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,
|
|
Memory::ByteBuffer &out) override;
|
|
|
|
bool Sign(const Memory::MemoryViewRead &hash,
|
|
Memory::ByteBuffer &out) override;
|
|
|
|
bool ECDH(const AuSPtr<IECCPublic> &partnerPublic,
|
|
Memory::ByteBuffer &sharedKey) override;
|
|
|
|
bool AsPublicECC(Memory::ByteBuffer &out) override;
|
|
|
|
bool AsPrivateECC(Memory::ByteBuffer &out) override;
|
|
|
|
EECCCurve GetType() override;
|
|
|
|
private:
|
|
ecc_key _key;
|
|
EECCCurve _type;
|
|
};
|
|
} |