#include "../include/sibs/PubsubKey.hpp" namespace sibs { PubsubKey::PubsubKey() : data({}) { } PubsubKey::PubsubKey(const void *data, const usize size) { std::copy((char*)data, (char*)data + std::min(size, PUBSUB_KEY_LENGTH), this->data.begin()); if(size < PUBSUB_KEY_LENGTH) std::fill_n((char*)data + size, PUBSUB_KEY_LENGTH - size, 0); } bool PubsubKey::operator == (const PubsubKey &other) const { return data == other.data; } bool PubsubKey::operator != (const PubsubKey &other) const { return data != other.data; } }