mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
This is a way to do deterministic keys that fits in better.
This commit is contained in:
11
key.h
11
key.h
@@ -86,6 +86,8 @@ protected:
|
||||
EC_KEY* pkey;
|
||||
bool fSet;
|
||||
|
||||
static EC_KEY* GenerateDeterministicKey(const uint256& base, uint32 n, bool private_key);
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<CKey> pointer;
|
||||
|
||||
@@ -115,11 +117,20 @@ public:
|
||||
return (*this);
|
||||
}
|
||||
|
||||
|
||||
~CKey()
|
||||
{
|
||||
EC_KEY_free(pkey);
|
||||
}
|
||||
|
||||
CKey(const uint256& base, uint32 seq, bool private_key) : fSet(true)
|
||||
{
|
||||
pkey=GenerateDeterministicKey(base, seq, private_key);
|
||||
}
|
||||
|
||||
static uint256 GetBaseFromString(const std::string& base);
|
||||
static uint256 GetRandomBase(void);
|
||||
|
||||
bool IsNull() const
|
||||
{
|
||||
return !fSet;
|
||||
|
||||
Reference in New Issue
Block a user