PHP Classes
Icontem

File: example1.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giulio Bai  >  gEncrypter  >  example1.php  
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
 

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

?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products