* @copyright Copyright (c) 2009, ConsultorPC * @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html * @link http://forums.consultorpc.com/ * @version 0.1 * @filesource */ require_once 'lib/crypt.class.php'; $key = $_POST['key']; $string = $_POST['string']; $requestedAction = $_POST['requestedAction']; $crypt = new crypt(); $crypt->Key = $key; // Check requested action if ( $requestedAction == 'encrypt' ) { $newString = $crypt->encrypt( $string ); } else { $newString = $crypt->decrypt( $string ); } echo $newString; ?>