mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
refactor: Take Span in SetSeed
This makes calling code less verbose and less fragile. Also, by adding the CKey::data() member function, it is now possible to call HexStr() with a CKey object.
This commit is contained in:
@@ -85,6 +85,7 @@ public:
|
||||
|
||||
//! Simple read-only vector-like interface.
|
||||
unsigned int size() const { return (fValid ? keydata.size() : 0); }
|
||||
const unsigned char* data() const { return keydata.data(); }
|
||||
const unsigned char* begin() const { return keydata.data(); }
|
||||
const unsigned char* end() const { return keydata.data() + size(); }
|
||||
|
||||
@@ -177,7 +178,7 @@ struct CExtKey {
|
||||
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
|
||||
bool Derive(CExtKey& out, unsigned int nChild) const;
|
||||
CExtPubKey Neuter() const;
|
||||
void SetSeed(const unsigned char* seed, unsigned int nSeedLen);
|
||||
void SetSeed(Span<const uint8_t> seed);
|
||||
};
|
||||
|
||||
/** Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. */
|
||||
|
||||
Reference in New Issue
Block a user