Class Auth_OpenID_CryptUtil

Description

Located in /Auth/OpenID/CryptUtil.php (line 26)


	
			
Method Summary
 static void constEq ( $s1,  $s2)
 static string getBytes (int $num_bytes)
 static string randomString (integer $length, [ $population = null], string $chrs)
Methods
static constEq (line 108)
void constEq ( $s1,  $s2)
  • $s1
  • $s2
static getBytes (line 40)

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

as
  1. null
, and the code will fall back on a pseudo-random number generator.

  • return: random bytes
string getBytes (int $num_bytes)
  • int $num_bytes: The length of the return value
static randomString (line 80)

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

  • return: A string of randomly-chosen characters from $chrs
string randomString (integer $length, [ $population = null], string $chrs)
  • 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
  • $population

Documentation generated on Thu, 29 Jul 2010 13:58:43 -0700 by phpDocumentor 1.4.3