mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Always require OS randomness when generating secret keys
This commit is contained in:
parent
a80de15113
commit
fa2637a3be
7 changed files with 59 additions and 17 deletions
|
|
@ -124,9 +124,8 @@ bool CKey::Check(const unsigned char *vch) {
|
|||
}
|
||||
|
||||
void CKey::MakeNewKey(bool fCompressedIn) {
|
||||
RandAddSeedPerfmon();
|
||||
do {
|
||||
GetRandBytes(vch, sizeof(vch));
|
||||
GetStrongRandBytes(vch, sizeof(vch));
|
||||
} while (!Check(vch));
|
||||
fValid = true;
|
||||
fCompressed = fCompressedIn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue