Powerful php encryption/decryption extension: cryptopp is a powerful encryption/decryption extension written in c ++. excellent performance and reliability. all encryption and decryption classes written in PHP can be replaced. moreover, the programming interfaces provided by PHP are very simple and easy to use.
The extended cryptopp interface is as follows:
class cryptopp { public function __construct($param); public function setkey($param); public function encode($param); public function decode($param); public static function enhex($param); public static function dehex($param); public static function enbase64($param); public static function debase64($param); public static function enbase32($param); public static function debase32($param); public static function md5($param); public static function sha1($param); public static function sha256($param); public static function sha512($param);}
In addition to the encode and decode methods, there is no need for special instructions, and the method name is clear at a glance.
Encode and decode correspond to AES encryption and decryption respectively.
The usage is simple:
$key = "key";$cryptopp = new cryptopp($key);$str = "1234567890";$tmp = $cryptopp->encode($str);header('content-type:text/html;charset=utf-8');echo $str.'
';echo $tmp.'
';echo $cryptopp->decode($tmp);
The use of other static methods is simpler, so it is OK:
$str = "1234567890";cryptopp::md5($str);cryptopp::sha1($str);cryptopp::sha256($str);....
: Https://drive.google.com/file/d/0B2RkHfVa7EtzSWItWkFIV2FPbGM/view? Usp = sharing
Cryptopp extensions are compiled and used on 64-bit ubuntu and are not suitable for 32-bit systems. Currently, the 32-bit version is not provided. Windows is unavailable. Whether it can be used in other 64-bit linux systems is not tested and unknown.