Auth_OpenID_CryptUtil Class Reference

List of all members.


Detailed Description

Definition at line 26 of file CryptUtil.php.


Public Member Functions

 getBytes ($num_bytes)
 randomString ($length, $population=null)

Member Function Documentation

Auth_OpenID_CryptUtil.getBytes ( num_bytes  ) 

Get the specified number of random bytes.

Attempts to use a cryptographically secure (not predictable) source of randomness if available. If there is no high-entropy randomness source available, it will fail. As a last resort, for non-critical systems, define Auth_OpenID_RAND_SOURCE as null, and the code will fall back on a pseudo-random number generator.

Parameters:
int $num_bytes The length of the return value
Returns:
string $bytes random bytes

Definition at line 40 of file CryptUtil.php.

Auth_OpenID_CryptUtil.randomString ( length,
population = null 
)

Produce a string of length random bytes, chosen from chrs. If $chrs is null, the resulting string may contain any characters.

Parameters:
integer $length The length of the resulting randomly-generated string
string $chrs A string of characters from which to choose to build the new string
Returns:
string $result A string of randomly-chosen characters from $chrs

Definition at line 80 of file CryptUtil.php.


The documentation for this class was generated from the following file:

Generated on Thu Feb 19 15:03:21 2009 for OXID eShop CE by  doxygen 1.5.5