B_GenerateRandomBytes

 

 

B_GenerateRandomBytes

 

 

 

int B_GenerateRandomBytes (

 

B_ALGORITHM_OBJ randomAlgorithm,

/* random algorithm */

unsigned char

*output,

/* buffer for output bytes */

unsigned int

outputLen,

/* number of bytes to output */

A_SURRENDER_CTX *surrenderContext

/* surrender context */

);

 

 

 

 

 

Description

B_GenerateRandomBytes generates outputLen pseudo-random bytes from randomAlgorithm, storing the result in output. The randomAlgorithm must have been seeded. The surrender context for processing and canceling during lengthy operations is surrenderContext; if its value is (A_SURRENDER_CTX *)NULL_PTR, Crypto-C does not use it. See B_RandomInit.

Return value

Value

Description

0

Operation was successful.

non-zero

see Appendix A, ”Crypto-C Error Types”

 

 

C h a p t e r 4 D e t a i l s o f C r y p t o - C F u n c t i o n s

319

Page 329
Image 329
RSA Security 5 manual Int BGenerateRandomBytes