random.c updated, conflict with TIRTOS

This commit is contained in:
kaleb-himes
2015-01-09 16:01:22 -07:00
parent aff7669cad
commit 1ebaf41808

View File

@ -596,7 +596,7 @@ int wc_InitRng(RNG* rng)
ret = wc_GenerateSeed(&rng->seed, key, 32);
if (ret == 0) {
Arc4SetKey(&rng->cipher, key, sizeof(key));
wc_Arc4SetKey(&rng->cipher, key, sizeof(key));
ret = wc_RNG_GenerateBlock(rng, junk, 256); /*rid initial state*/
}
@ -621,7 +621,7 @@ int wc_RNG_GenerateBlock(RNG* rng, byte* output, word32 sz)
return CaviumRNG_GenerateBlock(rng, output, sz);
#endif
XMEMSET(output, 0, sz);
Arc4Process(&rng->cipher, output, output, sz);
wc_Arc4Process(&rng->cipher, output, output, sz);
return 0;
}