TSecurityManager class
TSecurityManager provides private keys, hashing and encryption functionalities that may be used by other PRADO components, such as viewstate persister, cookies.
TSecurityManager is mainly used to protect data from being tampered and viewed. It can generate HMAC and encrypt the data. The private key used to generate HMAC is set by ValidationKey. The key used to encrypt data is specified by EncryptionKey. If the above keys are not explicitly set, random keys will be generated and used.
To prefix data with an HMAC, call hashData(). To validate if data is tampered, call validateData(), which will return the real data if it is not tampered. The algorithm used to generated HMAC is specified by Validation.
To encrypt and decrypt data, call encrypt() and decrypt() respectively. The encryption algorithm can be set by Encryption.
Note, to use encryption, the PHP Mcrypt extension must be loaded.
Located in /Security/TSecurityManager.php (line 42)
TComponent | --TApplicationComponent | --TModule | --TSecurityManager
Computes the HMAC for the data with getValidationKey.
Decrypts data with getEncryptionKey.
Encrypts data with getEncryptionKey.
Generates a random key.
Prefixes data with an HMAC.
Initializes the module.
The security module is registered with the application.
Validates if data is tampered.
Inherited From TModule
TModule::getID()
TModule::init()
TModule::setID()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:36:10 -0400 by phpDocumentor 1.3.0RC4