<?php
# - Include Class Encryption
require_once('Encryption.php');
# - Key to encrypt and decrypt
$secureKey = 'SECRET_KEY';
# - Separator encrypted string; Allowed: !@#%&*=+/~:?
$separator = '/';
# - Starting class and by setting parameters
$encrypt = new Encryption( $secureKey, $separator);
# - Example of text to encrypt and decrypt
$encodeTXT = 'Hello World';
# - Encrypt
$crypt = $encrypt->encode( $encodeTXT );
# - Decrypt
$decrypt = $encrypt->decode( $crypt );
# - Print text Encrypt
print('Encrypted: ' . $crypt);
print('<br />');
# - Print text Decrypt
print('Decrypted: ' . $decrypt);
?>
|