#include "blob.hpp"
Public Types | |
using | Bytes = std::vector< uint8_t > |
![]() | |
using | ModelType = Blob |
![]() | |
using | base_type = Blob |
Public Member Functions | |
Blob ()=default | |
Blob (const std::string &blob) | |
Blob (const Bytes &blob) | |
Blob (Bytes &&blob) noexcept | |
virtual const Bytes & | blob () const |
virtual const std::string & | hex () const |
virtual size_t | size () const |
std::string | toString () const override |
bool | operator== (const Blob &rhs) const override |
![]() | |
virtual bool | operator== (const ModelType &rhs) const=0 |
virtual bool | operator!= (const ModelType &rhs) const |
virtual | ~ModelPrimitive ()=default |
![]() | |
virtual | ~Cloneable ()=default |
Static Public Member Functions | |
static Blob | fromHexString (const std::string &hex) |
Protected Member Functions | |
Blob * | clone () const override |
Blob class present user-friendly blob for working with low-level binary stuff. Its length is not fixed in compile time.
using shared_model::crypto::Blob::Bytes = std::vector<uint8_t> |
|
default |
|
explicit |
Create blob from a string
blob | - string to create blob from |
|
explicit |
Create blob from a vector
blob | - vector to create blob from |
|
explicitnoexcept |
|
virtual |
|
overrideprotectedvirtual |
Polymorphic clone constructor. Method guarantees deep-copy.
Implements Cloneable< Blob >.
|
static |
Creates new Blob object from provided hex string
hex | - string in hex format to create Blob from |
|
virtual |
|
override |
|
virtual |
|
overridevirtual |
Make string developer representation of object
Reimplemented from shared_model::interface::ModelPrimitive< Blob >.
Reimplemented in shared_model::crypto::Hash, shared_model::crypto::Signed, shared_model::crypto::PrivateKey, shared_model::crypto::PublicKey, and shared_model::crypto::Seed.