[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/openid/Auth/OpenID/ -> CryptUtil.php (summary)

CryptUtil: A suite of wrapper utility functions for the OpenID library. PHP versions 4 and 5

Author: JanRain, Inc. <openid@janrain.com>
Copyright: 2005-2008 Janrain, Inc.
License: http://www.apache.org/licenses/LICENSE-2.0 Apache
File Size: 112 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Auth_OpenID_CryptUtil:: (2 methods):
  getBytes()
  randomString()


Class: Auth_OpenID_CryptUtil  - X-Ref

getBytes($num_bytes)   X-Ref
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
<code>Auth_OpenID_RAND_SOURCE</code> as <code>null</code>, and
the code will fall back on a pseudo-random number generator.

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

randomString($length, $population = null)   X-Ref
Produce a string of length random bytes, chosen from chrs.  If
$chrs is null, the resulting string may contain any characters.

param: integer $length The length of the resulting
param: string $chrs A string of characters from which to choose
return: string $result A string of randomly-chosen characters



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1