PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Gabriel Almeida   Simple Crypt   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example for use of class
Class: Simple Crypt
Replace characters to text unreadable
Author: By
Last change:
Date: 10 years ago
Size: 452 bytes
 

Contents

Class file image Download
<?php

// - Include Class
require_once('simplecrypt.php');

// - Starting Class
$simpleCrypt = new SimpleCrypt;


// - Example of text
$text = 'Hello World';


// - Encrypt
$crypt = $simpleCrypt->encode( $text );
// - Decrypt
$decrypt = $simpleCrypt->decode( $crypt );


// - Print text Encrypt
print('Encrypted: ' . $crypt);


print(
'<br />');


// - Print text Decrypt
print('Decrypted: ' . $decrypt);