Functions for implementing security, including secure random numbers
This is the code documentation for the SproutCMS project
Search documentation |
class SecurityFunctions for implementing security, including secure random numbers
Functions
public compareStringsbool Security::compareStrings ( string $known_string , string $user_string ); Constant-time string comparison protected getServerKeystring Security::getServerKey ( ); Return the server key public passwordComplexityarray Security::passwordComplexity ( string $str , int $length , int $classes , bool $bad_list ); Check the given password meets complexity requirements public randBytestring Security::randByte ( ); Return a single random byte public randBytesstring Security::randBytes ( int $length ); Returns a binary string of random bytes public randStrstring Security::randStr ( [ int $length [, mixed $chars ]] ); Returns a string of random characters public serverKeySignstring Security::serverKeySign ( array $fields ); Generate a signature from a given set of fields, using the server key For a given set of fields, the signature will always be the same value. Returned signatures are always URL and HTML safe public serverKeyVerifyvoid Security::serverKeyVerify ( array $fields , string $signature ); Verify a signature which was generated by Security::serverKeySign |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |