AuroraRuntime/Source/Crypto/ECC/PrivateECCImpl.hpp

30 lines
813 B
C++
Raw Normal View History

2021-09-21 01:54:47 +00:00
#pragma once
namespace Aurora::Crypto::ECC
{
struct PrivateECCImpl : IECCPrivate
2021-09-21 01:54:47 +00:00
{
PrivateECCImpl(EECCCurve type, ecc_key &key);
~PrivateECCImpl();
bool Sign(const Memory::MemoryViewRead &plainText,
Aurora::Hashing::EHashType method,
Memory::ByteBuffer &out) override;
2021-09-21 01:54:47 +00:00
bool Sign(const Memory::MemoryViewRead &hash,
Memory::ByteBuffer &out) override;
2021-09-21 01:54:47 +00:00
bool ECDH(const AuSPtr<IECCPublic> &partnerPublic,
Memory::ByteBuffer &sharedKey) override;
2021-09-21 01:54:47 +00:00
bool AsPublicECC(Memory::ByteBuffer &out) override;
2021-09-21 01:54:47 +00:00
bool AsPrivateECC(Memory::ByteBuffer &out) override;
2021-09-21 01:54:47 +00:00
EECCCurve GetType() override;
private:
ecc_key _key;
EECCCurve _type;
};
}