Security Class Reference

Static Public Member Functions | |
| cipher ($text, $key) | |
| generateAuthKey () | |
| & | getInstance () |
| hash ($string, $type=null, $salt=false) | |
| inactiveMins () | |
| setHash ($hash) | |
| validateAuthKey ($authKey) | |
Public Attributes | |
| $hashType = null | |
Detailed Description
Definition at line 37 of file security.php.
Member Function Documentation
| Security::cipher | ( | $ | text, | |
| $ | key | |||
| ) | [static] |
Encripts/Decrypts a text using the given key.
- Parameters:
-
string $text Encrypted string to decrypt, normal string to encrypt string $key Key to use
- Returns:
- string Encrypted/Decrypted string public
Definition at line 175 of file security.php.
References $out, and getInstance().
| Security::generateAuthKey | ( | ) | [static] |
Generate authorization hash.
- Returns:
- string Hash public
Definition at line 89 of file security.php.
References getInstance(), App::import(), and String::uuid().
Referenced by ProjectTask::securitySalt().
| & Security::getInstance | ( | ) | [static] |
Singleton implementation to get object instance.
- Returns:
- object public
Definition at line 53 of file security.php.
Referenced by cipher(), generateAuthKey(), hash(), inactiveMins(), setHash(), and validateAuthKey().
| Security::hash | ( | $ | string, | |
| $ | type = null, |
|||
| $ | salt = false | |||
| ) | [static] |
Create a hash from string using given method.
- Parameters:
-
string $string String to hash string $type Method to use (sha1/sha256/md5) boolean $salt If true, automatically appends the application's salt value to $string (Security.salt)
- Returns:
- string Hash public
Definition at line 119 of file security.php.
References getInstance(), and Configure::read().
Referenced by AuthComponent::password(), and FormHelper::secure().
| Security::inactiveMins | ( | ) | [static] |
Get allowed minutes of inactivity based on security level.
- Returns:
- integer Allowed inactivity in minutes public
Definition at line 67 of file security.php.
References getInstance(), low(), and Configure::read().
Referenced by CakeSession::_checkValid().
| Security::setHash | ( | $ | hash | ) | [static] |
Sets the default hash method for the Security object. This affects all objects using Security::hash().
- Parameters:
-
string $hash Method to use (sha1/sha256/md5) public
- See also:
- Security::hash()
Definition at line 162 of file security.php.
References getInstance().
| Security::validateAuthKey | ( | $ | authKey | ) | [static] |
Validate authorization hash.
- Parameters:
-
string $authKey Authorization hash
- Returns:
- boolean Success public
Definition at line 104 of file security.php.
References getInstance().
Member Data Documentation
| Security::$hashType = null |
Definition at line 45 of file security.php.
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/security.php