PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Antonio Leiva   PHP Rijndael OpenSSL   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Rijndael OpenSSL
Encrypt and decrypt data using Rijndael algorithm
Author: By
Last change:
Date: 5 years ago
Size: 380 bytes
 

Contents

Class file image Download
<?php
include 'RijndaelOpenSSL.php';

$original = 'This is a text to encrypt!';
$pass ='ThisIsMyPassword';

$rijndael = new RijndaelOpenSSL();

$encriptado = $rijndael->encrypt($original, $pass);
$desencriptado = $rijndael->decrypt($encriptado, $pass);

echo
'Encriptado:' . PHP_EOL . $encriptado . PHP_EOL;
echo
'Desencriptado:' . PHP_EOL. $desencriptado . PHP_EOL;