[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: Auth_OpenID_CryptUtil

Source Location: /zp-extensions/federated_logon/Auth/OpenID/CryptUtil.php

Class Auth_OpenID_CryptUtil

Method Summary
static void   constEq()  
static string   getBytes()   Get the specified number of random bytes.
static string   randomString()   Produce a string of length random bytes, chosen from chrs. If $chrs is null, the resulting string may contain any characters.

[ Top ]
Methods
static method constEq  [line 108]

  static void constEq( $s1, $s2  )

Parameters:
   $s1: 
   $s2: 


[ Top ]
static method getBytes  [line 40]

  static string getBytes( int $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

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

Parameters:
int   $num_bytes:  The length of the return value

API Tags:
Return:  random bytes


[ Top ]
static method randomString  [line 80]

  static string randomString( integer $length, [ $population = null], string $chrs  )

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
   $population: 

API Tags:
Return:  A string of randomly-chosen characters from $chrs


[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:07:07 +0100 by phpDocumentor 1.4.3