Table of Contents

AES / Rijndael

Chris Veness has ported his JavaScript AES implementation to PHP code. I wrapped the whole thing into a class for easier use.

Download it here: aes.class.phps (14.54 KiB, 50 downloads)

Usage

<?php
 
require_once('aes.class.php');
 
$text = 'Hello, world!';
$password = 'itsmysecret';
$blocksize = 256;  // can be 128, 192 or 256
 
$crypted = AES::encrypt( $text, $password, $blocksize );
// do something ...
$decrypted =  AES::decrypt( $crypted, $password, $blocksize );
?>

See Also


 
snippets/php/aes-rijndael.txt · Last modified: 2009-12-22 02:11.01 by mbirth
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Contents powered by Club-Mate Contents powered by BassDrive.com Labelled with ICRA