CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace crypto {
class KeyPair; }
28 class BatchPacketReader;
33 namespace catapult {
namespace ionet {
40 const std::shared_ptr<PacketIo>& pIo,
41 const crypto::KeyPair& sourceKeyPair,
43 uint32_t maxSignedPacketDataSize);
48 const std::shared_ptr<BatchPacketReader>&
pReader,
49 const Key& remoteKey);
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
utils::ByteArray< Hash256_Size, Hash256_tag > Hash256
Definition: src/catapult/types.h:47
void Sha3_256(const RawBuffer &dataBuffer, Hash256 &hash) noexcept
Calculates the 256-bit SHA3 hash of dataBuffer into hash.
Definition: Hashes.cpp:81
uint32_t m_maxSignedPacketDataSize
Definition: SecureSignedPacketIo.cpp:127
std::shared_ptr< BatchPacketReader > m_pReader
Definition: SecureSignedPacketIo.cpp:157
def warning(*args)
Definition: colorPrint.py:10
const Key & m_remoteKey
Definition: SecureSignedPacketIo.cpp:83
KeccakBuilder< Sha3ModeTag, Hash256_tag > Sha3_256_Builder
Sha3_256_Builder.
Definition: Hashes.h:85
PacketType
An enumeration of known packet types.
Definition: PacketType.h:171
SocketOperationCode
Enumeration of socket operation results.
Definition: SocketOperationCode.h:50
constexpr bool IsPacketDataSizeValid(const PacketHeader &header, size_t maxPacketDataSize)
Determines if header indicates a valid packet data size no greater than maxPacketDataSize.
Definition: PacketHeader.h:41
std::weak_ptr< ChainedSocketReader > pReader
Definition: PacketReaders.cpp:38
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
std::shared_ptr< BatchPacketReader > CreateSecureSignedBatchPacketReader(const std::shared_ptr< BatchPacketReader > &pReader, const Key &remoteKey)
Definition: SecureSignedPacketIo.cpp:162
consumer< SocketOperationCode, const Packet * > ReadCallback
Definition: PacketIo.h:33
static PacketPayload Merge(const std::shared_ptr< const Packet > &pPacket, const PacketPayload &payload)
Merges a packet (pPacket) and a packet payload into a new packet payload.
Definition: PacketPayload.cpp:59
std::shared_ptr< PacketIo > CreateSecureSignedPacketIo(const std::shared_ptr< PacketIo > &pIo, const crypto::KeyPair &sourceKeyPair, const Key &remoteKey, uint32_t maxSignedPacketDataSize)
Definition: SecureSignedPacketIo.cpp:131
std::shared_ptr< PacketIo > m_pIo
Definition: SecureSignedPacketIo.cpp:124
Definition: AddressExtractionExtension.cpp:28
bool Verify(const Key &publicKey, const RawBuffer &dataBuffer, const Signature &signature)
Definition: Signer.cpp:136
void Sign(const KeyPair &keyPair, const RawBuffer &dataBuffer, Signature &computedSignature)
Definition: Signer.cpp:82
PacketIo::ReadCallback m_callback
Definition: SecureSignedPacketIo.cpp:84
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
const crypto::KeyPair & m_sourceKeyPair
Definition: SecureSignedPacketIo.cpp:125
static constexpr PacketType Packet_Type
Definition: SecureSignedPacketIo.cpp:32