Crypto Secure Random Generator

Contains functions for generating random numbers and strings.

Class Methods

The following methods can be invoked on instances of this class.

getCodesForClass(string strClass)

Retrieves all ASCII codes for a specific class of characters

getFilterForClesses(unknown arrClasses)

Returns an array (filter) containing all the ASCII code for characters corresponding to a set of classes

getRandomByte(mixed arrInclusionFilter, array arrExclusionFilter)

Retrieves a single crypto secure random byte whcih matches the inclusion filter (array of ASCII codes)

randomInt(mixed iMin, int iMax)

Generates a random int
Adapted from Random Compat library as it seems the most efficient way to do it

randomFloat(mixed fMin, float fMax)

Generates a random floating point

randomBool()

Returns a random boolean

randomString(mixed iLength, mixed bCaps, mixed bNumbers, bool bSymbols)

Generates a random string

randomWordLike(mixed iLength)

Creates a random word with vowels separating each letter

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class