RSA BSAFE Cert-C Micro Edition

The power of PKI for the smallest of devices

Random Number Generation Functions

This section outlines the functions that generate pseudo random numbers used for padding and generating keys. The functions interact with the Pseudo Random Number Generator (PRNG) state engine to produce a random number stream.

Functions

int R_CR_random_seed (R_CR *crypto, unsigned char *bytes, unsigned int len)
 Seeds the Pseudo Random Number Generator (PRNG). More...

int R_CR_random_bytes (R_CR *crypto, unsigned int dlen, unsigned char *obuf, unsigned int *olen)
 Returns a number of random Bytes. More...


Function Documentation

int R_CR_random_bytes R_CR   crypto,
unsigned int    dlen,
unsigned char *    obuf,
unsigned int *    olen
;
 

Returns a number of random Bytes.

Parameters:
crypto [In] A pointer to the cryptographic object.
dlen [In] The number of Bytes requested.
obuf [Out] The buffer that takes the random Bytes.
olen [Out] The number of random Bytes returned.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_CR_random_seed().

int R_CR_random_seed R_CR   crypto,
unsigned char *    bytes,
unsigned int    len
;
 

Seeds the Pseudo Random Number Generator (PRNG).

Parameters:
crypto [In] A pointer to the cryptographic object.
bytes [In] A pointer to the seed data.
len [In] The length of the seed data.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_CR_random_bytes().


Copyright (c) 1999-2002 RSA Security Inc. All rights reserved. 061-001005-150-001-000-3768 - 1.5