[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/ -> Random.php (summary)

Random Number Generator PHP version 5

Author: Jim Wigginton
Copyright: 2007 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 280 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Random:: (2 methods):
  string()
  phpseclib_safe_serialize()


Class: Random  - X-Ref

Pure-PHP Random Number Generator

string($length)   X-Ref
Generate a random string.

Although microoptimizations are generally discouraged as they impair readability this function is ripe with
microoptimizations because this function has the potential of being called a huge number of times.
eg. for RSA key generation.

return: string
param: int $length

phpseclib_safe_serialize(&$arr)   X-Ref
Safely serialize variables

If a class has a private __sleep() method it'll give a fatal error on PHP 5.2 and earlier.
PHP 5.3 will emit a warning.

param: mixed $arr