PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Wanderson Regis Silva   Encryptor   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This is an example
Class: Encryptor
Encrypt and decrypt text by adding key sum
Author: By
Last change:
Date: 16 years ago
Size: 313 bytes
 

Contents

Class file image Download
<?php
// Gets the class definition
include("class.encriptor.php");

// Data to be used
$key = "key";
$text = "text to be encrypted";

// Starts object with key
$crypt = new Encriptor($key);
// Generates encrypted version
$encp = $crypt->encrypt($text);
// Decrypts
$decp = $crypt->decrypt($encp);
?>