摘要:
function remove_xss($val) { // remove all non-printable characters. CR(0a) and LF(0b) and TAB(9) are allowed // this prevents some character re-spacin 阅读全文
posted @ 2017-09-14 11:55
ノGHJ
阅读(1117)
评论(0)
推荐(0)
摘要:
通过openssl实现的签名、验签、非对称加解密,需要配合x.509证书(如crt和pem)文件使用。 测试示例 阅读全文
posted @ 2017-09-14 11:55
ノGHJ
阅读(573)
评论(0)
推荐(0)
摘要:
<?php //Code By Safe3 function customError($errno, $errstr, $errfile, $errline) { echo "<b>Error number:</b> [$errno],error on line $errline in $errfi 阅读全文
posted @ 2017-09-14 11:54
ノGHJ
阅读(1533)
评论(0)
推荐(0)
摘要:
PHP的AES加密类 aes.php <?php /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* AES implementation in 阅读全文
posted @ 2017-09-14 11:43
ノGHJ
阅读(482)
评论(0)
推荐(0)
摘要:
php服务端与客户端交互、提供开放api时,通常需要对敏感的部分api数据传输进行数据加密,这时候rsa非对称加密就能派上用处了,下面通过一个例子来说明如何用php来实现数据的加密解密 1、加密解密的第一步是生成公钥、私钥对,私钥加密的内容能通过公钥解密(反过来亦可以) 下载开源RSA密钥生成工具o 阅读全文
posted @ 2017-09-14 11:42
ノGHJ
阅读(238)
评论(0)
推荐(0)
摘要:
[PHP]代码 <?php //blog.qita.in function passport_encrypt($txt, $key) { srand((double)microtime() * 1000000); $encrypt_key = md5(rand(0, 32000)); $ctr = 阅读全文
posted @ 2017-09-14 11:41
ノGHJ
阅读(214)
评论(0)
推荐(0)
摘要:
可以逆转的加密类,没有密钥很难破解 [PHP]代码 <? class encryptCalss { var $key=12; function encode($txt){ for($i=0;$i<strlen($txt);$i++){ $txt[$i]=chr(ord($txt[$i])+$this 阅读全文
posted @ 2017-09-14 11:41
ノGHJ
阅读(903)
评论(0)
推荐(0)
摘要:
[PHP]代码 阅读全文
posted @ 2017-09-14 11:40
ノGHJ
阅读(253)
评论(0)
推荐(0)
摘要:
KEY 是之前定义的常量 Mcrypt::encrypt(); Mcrypt::decrypt(); 阅读全文
posted @ 2017-09-14 11:38
ノGHJ
阅读(702)
评论(0)
推荐(0)
摘要:
1. 字符串 如果IDE没有代码自动补全功能,所以你应该记住下面的这些方法。 2. 链表 在Java中,链表的实现非常简单,每个节点Node都有一个值val和指向下个节点的链接next。 链表两个著名的应用是栈Stack和队列Queue。 栈: 队列: 3. 树 这里的树通常是指二叉树,每个节点都包 阅读全文
posted @ 2017-09-14 11:36
ノGHJ
阅读(449)
评论(0)
推荐(0)

浙公网安备 33010602011771号