ntru wc_ fixes

This commit is contained in:
kaleb-himes
2015-01-14 09:52:33 -07:00
parent 3229a96bb3
commit 8fe965cf24
3 changed files with 6 additions and 6 deletions

View File

@@ -163,13 +163,13 @@ static byte GetEntropy(ENTROPY_CMD cmd, byte* out)
static RNG rng;
if (cmd == INIT)
return (InitRng(&rng) == 0) ? 1 : 0;
return (wc_InitRng(&rng) == 0) ? 1 : 0;
if (out == NULL)
return 0;
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) {
*out = 1;

View File

@@ -1186,13 +1186,13 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out);
byte GetEntropy(ENTROPY_CMD cmd, byte* out)
{
if (cmd == INIT)
return (InitRng(&rng) == 0) ? 1 : 0;
return (wc_InitRng(&rng) == 0) ? 1 : 0;
if (out == NULL)
return 0;
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) {
*out = 1;

View File

@@ -3065,13 +3065,13 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
static RNG rng;
if (cmd == INIT)
return (InitRng(&rng) == 0) ? 1 : 0;
return (wc_InitRng(&rng) == 0) ? 1 : 0;
if (out == NULL)
return 0;
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) {
*out = 1;