MCPcopy Create free account
hub / github.com/ElementsProject/elements / Set

Method Set

src/key.h:73–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 //! Initialize using begin and end iterators to byte data.
72 template <typename T>
73 void Set(const T pbegin, const T pend, bool fCompressedIn)
74 {
75 if (size_t(pend - pbegin) != keydata.size()) {
76 fValid = false;
77 } else if (Check(&pbegin[0])) {
78 memcpy(keydata.data(), (unsigned char*)&pbegin[0], keydata.size());
79 fValid = true;
80 fCompressed = fCompressedIn;
81 } else {
82 fValid = false;
83 }
84 }
85
86 //! Simple read-only vector-like interface.
87 unsigned int size() const { return (fValid ? keydata.size() : 0); }

Callers 9

GetKeyIDsMethod · 0.45
DeriveMethod · 0.45
DecodeMethod · 0.45
DecodeDestinationFunction · 0.45
DecodeSecretFunction · 0.45
SetSeedMethod · 0.45
DecodeMethod · 0.45
SetupFromTxMethod · 0.45
IsToPubKeyFunction · 0.45

Calls 3

CheckFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected