Classes | |
| struct | Multihash |
Enumerations | |
| enum | Type : uint64_t { sha1 = 0x11, sha256 = 0x12, sha512 = 0x13, blake2s128 = 0xb250, blake2s256 = 0xb260, ed25519pub = 0xed, ed25519_sha3_256 = 0x15a16d } |
| https://github.com/multiformats/js-multihash/blob/master/src/constants.js More... | |
Functions | |
| iroha::expected::Result< Multihash, const char * > | createFromBuffer (ByteRange buffer) |
| iroha::expected::Result< Multihash, const char * > | createFromBuffer (shared_model::interface::types::ByteRange buffer) |
| Creates a multihash from a binary buffer. The first bytes denote the data type, then goes the length, and the following are the data. More... | |
| template<typename Container > | |
| void | encodeVarIntType (Type multihash_type, Container &buffer) |
| template<typename OutputContainer > | |
| void | encodeHexAppend (Type multihash_type, shared_model::interface::types::ByteRange input, OutputContainer &output) |
| template<typename NumberType > | |
| bool | readVarInt (shared_model::interface::types::ByteRange &buffer, NumberType &number) |
| template<typename NumberType , typename Container > | |
| void | encodeVarInt (NumberType number, Container &buffer) |
| enum iroha::multihash::Type : uint64_t |
https://github.com/multiformats/js-multihash/blob/master/src/constants.js
| Enumerator | |
|---|---|
| sha1 | |
| sha256 | |
| sha512 | |
| blake2s128 | |
| blake2s256 | |
| ed25519pub | |
| ed25519_sha3_256 | |
| iroha::expected::Result<Multihash, const char *> iroha::multihash::createFromBuffer | ( | ByteRange | buffer | ) |


| iroha::expected::Result<Multihash, const char *> iroha::multihash::createFromBuffer | ( | shared_model::interface::types::ByteRange | buffer | ) |
Creates a multihash from a binary buffer. The first bytes denote the data type, then goes the length, and the following are the data.
| buffer | - the buffer with the multihash |
|
inline |
Encode data with its type in multihash format and write hex string of result to a buffer. https://github.com/multiformats/multihash
| OutputContainer | destination byte string container type |
| [in] | type | of data to encode |
| [in] | input | binary data to encode |
| [out] | output | container to write to |


|
inline |
Append a single varint int to a buffer. https://github.com/multiformats/unsigned-varint#format
| NumberType | some unsigned integer type |
| Container | destination byte string container type |
| [in] | number | to encode |
| [out] | buffer | to write to |

|
inline |
Encode and append a multihash type to a buffer. https://github.com/multiformats/multihash
| Container | destination byte string container type |
| [in] | type | to encode |
| [out] | buffer | to write to |


|
inline |
Try to read single varint int from buffer. https://github.com/multiformats/unsigned-varint#format
| NumberType | some unsigned integer type |
How many varint bytes can a number of NumberType occupy. This is basically ceil(sizeof(number) * 8 / 7).
How much bytes are we going to read at most.
