MCPcopy Create free account
hub / github.com/bcndev/bytecoin / encode_addr

Function encode_addr

src/common/Base58.cpp:223–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223std::string encode_addr(uint64_t tag, const BinaryArray &data) {
224 BinaryArray buf = get_varint_data(tag);
225 append(buf, data.begin(), data.end());
226 crypto::Hash hash = crypto::cn_fast_hash(buf.data(), buf.size());
227 append(buf, hash.data, hash.data + addr_checksum_size);
228 return encode(buf);
229}
230
231bool decode_addr(std::string addr, uint64_t *tag, BinaryArray *data) {
232 BinaryArray addr_data;

Callers 3

api_create_proofMethod · 0.85

Calls 8

get_varint_dataFunction · 0.85
appendFunction · 0.85
cn_fast_hashFunction · 0.85
encodeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected