Replace OpenSSL's RAND_bytes() with libsodium's randombytes_buf()

This commit is contained in:
Jacob 2016-07-07 13:42:28 -05:00
parent 4751522162
commit dc2d83bfbe
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ static void new_keypair(struct lightningd_state *dstate,
struct privkey *privkey, struct pubkey *pubkey)
{
do {
randombytes_buf(privkey->secret, sizeof(privkey->secret));
randombytes_buf(privkey->secret, sizeof(privkey->secret));
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
}

View File

@ -25,7 +25,7 @@ static void new_keypair(struct lightningd_state *dstate,
struct privkey *privkey, struct pubkey *pubkey)
{
do {
randombytes_buf(privkey->secret, sizeof(privkey->secret));
randombytes_buf(privkey->secret, sizeof(privkey->secret));
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
}