PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of Giulio Bai   gEncrypter   example1.php   Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example #1
Class: gEncrypter
Encrypt and decrypt text with pure PHP using a key
Author: By
Last change:
Date: 17 years ago
Size: 476 bytes
 

Contents

Class file image Download
<?php

include_once('gEncrypter.php');

$string = "Hello! You can use any char you like, but please avoid the unsupported. You can also type in UPPERCASE words!!! Incredible, huh?";


$key = "ilarvet";

$e = new gEncrypter();

echo
$enc = $e->gED($string, $key); // Prints the encrypted data

echo "<br>";

echo
$dec = $e->gED($enc, $key); // Prints the original data, decrypted

echo "<br>";

echo
$e->key; // Prints the key used to encrypt/decrypt

?>