php代码实现aes加密
发现php4的加密模块在php5的不被支持了,硬要加上这个模块会导致启动时候出现警告对话框。
于是花了一天时间将as3的加密类翻译成了php的,该加密类是google的开源项目
http://code.google.com/p/as3crypto/
<?phpinterface ISymmetricKey{/** * Returns the block size used by this particular encryption algorithm */function getBlockSize();/** * Encrypt one block of data in "block", starting at "index", of length "getBlockSize()" */function encrypt($block, $index);/** * Decrypt one block of data in "block", starting at "index", of length "getBlockSize()" */function decrypt($block, $index);/** * Attempts to destroy sensitive information from memory, such as encryption keys. * Note: This is not guaranteed to work given the Flash sandbox model. */function dispose();function toString();}?>