tc_ctr_prng_generate() function
CTR-PRNG generate procedure Generates outlen pseudo-random bytes into out buffer, updates prng
Arguments
ctx
IN/OUT -- the PRNG context
additional_input
IN -- additional input to the prng (may be null)
additionallen
IN -- additional input length in bytes
out
IN/OUT -- buffer to receive output
outlen
IN -- size of out buffer in bytes
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CTR_PRNG_RESEED_REQ (-1) if a reseed is needed returns TC_CRYPTO_FAIL (0) if: ctx == NULL, out == NULL, outlen >= 2^16
Notes
Assumes tc_ctr_prng_init has been called for ctx