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: 15 years ago
Size: 476 bytes


Class file image Download


$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();

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

echo "<br>";

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

echo "<br>";

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


For more information send a message to info at phpclasses dot org.