LIBRARYCommon Security Services Manager library (cdsa$incssm300_shr.exe) API PARAMETERS
CCHandle (input)
The handle that describes the context of this cryptographicoperation used to link to the CSP-managed information.
RandomNumber (output)
Pointer to CSSM_DATA structure used to obtain therandom number and the size of the random number in bytes.
SPI PARAMETERS
CSPHandle (input)
The handle that describes the add-in CryptographicService Provider module used to perform calls to CSSM for the memoryfunctions managed by CSSM.
Context (input)
Pointer to CSSM_CONTEXT structure that describesthe attributes with this context.
DESCRIPTIONThis function generates random data. NOTES ON APIThe output is returned to the caller either by filling thecaller-specified buffer or by using the application's declared memoryallocation functions to allocate buffer space. To specify a specific,preallocated output buffer, the caller must provide an array ofone or more CSSM_DATA structures, each containing a Length fieldvalue greater than zero and a non-NULL data pointer field value.To specify automatic output buffer allocation by the CSP, the callermust provide an array of one or more CSSM_DATA structures, eachcontaining a Length field value equal to zero and a NULL data pointerfield value. The application is always responsible for deallocatingthe memory when it is no longer needed. NOTES ON SPIThe output is returned to the caller as specified in BufferManagement for Cryptographic Services. RETURN VALUEA CSSM_RETURN value indicating success or specifying a particularerror condition. The value CSSM_OK indicates success. All othervalues represent an error condition. ERRORSErrors are described in the CDSA Technical Standard.