Changeset View
Changeset View
Standalone View
Standalone View
src/base58.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | void SetKey(const K &key) { | ||||
SetData(Params().Base58Prefix(Type), vch, vch + Size); | SetData(Params().Base58Prefix(Type), vch, vch + Size); | ||||
} | } | ||||
K GetKey() { | K GetKey() { | ||||
K ret; | K ret; | ||||
if (vchData.size() == Size) { | if (vchData.size() == Size) { | ||||
// If base58 encoded data does not hold an ext key, return a | // If base58 encoded data does not hold an ext key, return a | ||||
// !IsValid() key | // !IsValid() key | ||||
ret.Decode(&vchData[0]); | ret.Decode(vchData.data()); | ||||
} | } | ||||
return ret; | return ret; | ||||
} | } | ||||
CBitcoinExtKeyBase(const K &key) { SetKey(key); } | CBitcoinExtKeyBase(const K &key) { SetKey(key); } | ||||
CBitcoinExtKeyBase(const std::string &strBase58c) { | CBitcoinExtKeyBase(const std::string &strBase58c) { | ||||
SetString(strBase58c.c_str(), Params().Base58Prefix(Type).size()); | SetString(strBase58c.c_str(), Params().Base58Prefix(Type).size()); | ||||
Show All 16 Lines |