php 加密解密

用这个加密:base64_encode ( string $data )
<?php
$str = 'This is an encoded string';
echo base64_encode($str);
?>
用这个解密:base64_decode ( string $data [, bool $strict= false ] )
<?php
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
echo base64_decode($str);
?>

你可能感兴趣的:(加密解密)