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: 8 years ago
Size: 313 bytes


Class file image Download
// Gets the class definition

// 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);