Recommended Links
Common For all pages
This section shows you how you can have editable content which is the same throughout the site ( NOTE: It is language specific ) .All the navs below are generated using snippets that are included with the framework, edit this content to see how it was generated
Sub Nav:
Main Nav:
Footer Nav:
Unique Per Page
Encryption
The 'Encryption' Class is a wrapper around the Encryption Library ( http://phpclasses.ca/browse/file/17234.html )
Example:
Example:
//This is a controller function
function Encrypt()
{
//First we include the 'Encryption' php class file
require_once '/libs/standalone/Encryption.php';
//We then create an instance of the 'Encryption' class
$crypt = new Encryption();
//We then set the mode of encryption
//This can be one of the following:
//CRYPT_MODE_BINARY, CRYPT_MODE_BASE64 or CRYPT_MODE_HEXADECIMAL
//You must provide the mode for decryption as well
$crypt->Mode = CRYPT_MODE_BASE64;
//We then set the 'Key' to use for encryption
//You must provide the same key for decryption as well
$crypt->Key = '!@#$%&*()_+?:';
//We then perform the encryption
$criptString = $crypt->encrypt('Some Secure String');
//And echo the encrypted string
echo 'The result after encryption: '.$criptString.'
';
//For testing purpases we then call another function of the controller
//which accepts an encrypted string as an argument
$this->Decrypt($criptString);
//see the function below
}
//This is a controller function
function Decrypt( $cryptString = '' )
{
require_once '/libs/standalone/Encryption.php';
$crypt = new Encryption();
//Must be the same as what was used for encryption
$crypt->Mode = CRYPT_MODE_BASE64;
//Must be the same as what was used for encryption
$crypt->Key = '!@#$%&*()_+?:';
//This function performs the decryption of an encrypted string
$string = $crypt->decrypt($cryptString);
echo 'The result after decryption: '.$string.'
';
}