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: 6 years ago
Size: 380 bytes


Class file image Download
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);

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