tc_ctr_prng_init() function
CTR-PRNG initialization procedure Initializes prng context with entropy and personalization string (if any)
Arguments
ctx
IN/OUT -- the PRNG context to initialize
entropy
IN -- entropy used to seed the PRNG
entropyLen
IN -- entropy length in bytes
personalization
IN -- personalization string used to seed the PRNG (may be null)
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: ctx == NULL, entropy == NULL, entropyLen < (TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE)
Notes
Only the first (TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE) bytes of both the entropy and personalization inputs are used - supplying additional bytes has no effect.