User's Manual

500 | Reference Dell Networking W-ClearPass Guest 6.4 | User Guide
Formats a non-negative size in bytes as a human readable number (bytes, KB, MB, GB, etc.) Assumes base 10
rules in measurement; that is, 1 KB = 1000 bytes, 1 MB = 1000 KB, etc. If a negative value is supplied, returns
the $unknown string. If a non-numeric value is supplied, that value is returned directly.
NwaComplexPassword
NwaComplexPassword($len = 8)
Generates complex passwords of at least $len characters in length, where $len must be at least 4. A complex
password includes at least 1 each of a lower case character, upper case character, digit, and punctuation
(symbol).
NwaCsvCache
NwaCsvCache($csv_file, $use_cache = true, $options = null)
Loads and parses the contents of a CSV file, using a built-in cache. The cache may be cleaned for a specific file
by setting $use_cache to false. The cache may be cleaned for ALL files by setting $csv_file to the empty
string and $use_cache to false.
CSV parsing options (see "NwaParseCsv" on page 501) may be specified in $options. Additionally, a 2-
argument form of this function may be used by passing an array of $options as the second argument; in this
case, $use_cache is assumed to be true. This function returns false if the file does not exist; otherwise,
returns an array of arrays containing each of the parsed records from the file.
NwaDigitsPassword($len)
NwaDigitsPassword($len)
Generates digit-only passwords of at least $len characters in length.
NwaDynamicLoad
NwaDynamicLoad($func)
Loads the PHP function $func for use in the current expression or code block. Returns true if the function
exists (that is, the function is already present or was loaded successfully), or false if the function does not exist.
Attempting to use an undefinced function will result in a PHP Fatal Error. Use this function before using any of the
standard Nwa...() functions.
NwaGeneratePictureString
NwaGeneratePictureString($string)
Creates a password based on a format string. For details on the special characters recognized in $string, see
"Format Picture String Symbols" on page 515.
NwaGenerateRandomPasswordMix
NwaGenerateRandomPasswordMix($password_len, $lower = 1, $upper = 1, $digit = 1, $symbol = -
1)
Generates a random password that meets a certain minimum complexity requirement.
l $password_len specifies the total length in characters of the generated password. The password returned
will be at least $upper + $lower + $digit + $symbol characters in length. Any length beyond the
required minimum will be made up of any allowed characters.
l $lower specifies the minimum number of lowercase characters to include, or -1 to not use any lowercase
characters.