forked from wolfSSL/wolfssl
ntru wc_ fixes
This commit is contained in:
@@ -163,13 +163,13 @@ static byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
|||||||
static RNG rng;
|
static RNG rng;
|
||||||
|
|
||||||
if (cmd == INIT)
|
if (cmd == INIT)
|
||||||
return (InitRng(&rng) == 0) ? 1 : 0;
|
return (wc_InitRng(&rng) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cmd == GET_BYTE_OF_ENTROPY)
|
if (cmd == GET_BYTE_OF_ENTROPY)
|
||||||
return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
return (wc_RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
||||||
*out = 1;
|
*out = 1;
|
||||||
|
@@ -1186,13 +1186,13 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out);
|
|||||||
byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
||||||
{
|
{
|
||||||
if (cmd == INIT)
|
if (cmd == INIT)
|
||||||
return (InitRng(&rng) == 0) ? 1 : 0;
|
return (wc_InitRng(&rng) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cmd == GET_BYTE_OF_ENTROPY)
|
if (cmd == GET_BYTE_OF_ENTROPY)
|
||||||
return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
return (wc_RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
||||||
*out = 1;
|
*out = 1;
|
||||||
|
@@ -3065,13 +3065,13 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
|||||||
static RNG rng;
|
static RNG rng;
|
||||||
|
|
||||||
if (cmd == INIT)
|
if (cmd == INIT)
|
||||||
return (InitRng(&rng) == 0) ? 1 : 0;
|
return (wc_InitRng(&rng) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cmd == GET_BYTE_OF_ENTROPY)
|
if (cmd == GET_BYTE_OF_ENTROPY)
|
||||||
return (RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
return (wc_RNG_GenerateBlock(&rng, out, 1) == 0) ? 1 : 0;
|
||||||
|
|
||||||
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
if (cmd == GET_NUM_BYTES_PER_BYTE_OF_ENTROPY) {
|
||||||
*out = 1;
|
*out = 1;
|
||||||
|
Reference in New Issue
Block a user