Login +

Reference Guide / SLS_Security

SLS_Security1 is a class of encryption / decryption RSA.

Accessibility

At Controller level, you can access it directly by inheritance on SLS_Generic2Controller:

$this->_security;
// Or directly statically
SLS_Security::method();

At others levels (PHP), you can access it by reference to SLS_Generic2:

$this->_generic->getObjectSecurity();
// Or if u haven't a reference to SLS_Generic, using the singleton:
SLS_Generic::getInstance()->getObjectSecurity();

Encryption / Decryption

- If you want to encrypt a string, you can use the encrypt() function:

$this->_security::encrypt($plain);

- If you want to decrypt a string, you can use the decrypt() function:

$this->_security::decrypt($encrypted);

References

  1. SLS_Security - Manage Security
  2. SLS_Generic - Generic Class - Used eveywhere in the application