Security Class Reference

Inheritance diagram for Security:

Object List of all members.

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 35 of file security.php.


Member Function Documentation

Security::cipher ( text,
key 
) [static]

Encrypts/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 172 of file security.php.

References $out, __(), and getInstance().

Security::generateAuthKey (  )  [static]

Generate authorization hash.

Returns:
string Hash public

Definition at line 86 of file security.php.

References hash(), App::import(), and String::uuid().

Referenced by ProjectTask::securitySalt().

& Security::getInstance (  )  [static]

Singleton implementation to get object instance.

Returns:
object public

Definition at line 50 of file security.php.

Referenced by cipher(), hash(), inactiveMins(), and setHash().

Security::hash ( string,
type = null,
salt = false 
) [static]

Create a hash from string using given method. Fallback on next available 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 116 of file security.php.

References getInstance(), md5(), and Configure::read().

Referenced by generateAuthKey(), 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 64 of file security.php.

References getInstance(), low(), and Configure::read().

Referenced by __construct(), and _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
Returns:
void
See also:
Security::hash()

Definition at line 159 of file security.php.

References getInstance().

Security::validateAuthKey ( authKey  )  [static]

Validate authorization hash.

Parameters:
string $authKey Authorization hash
Returns:
boolean Success public
Todo:
Complete implementation

Definition at line 101 of file security.php.


Member Data Documentation

Security::$hashType = null

Definition at line 42 of file security.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7