码迷,mamicode.com
首页 > 其他好文 > 详细

加密

时间:2017-10-03 12:07:07      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:http   fan   ref   detail   targe   span   加密   creat   cookie   

1. sha1算法

cookie-parse中对cookie值加密,如:

//对string进行sha1算法  
function sha1(str){  
  return crypto.createHash(‘sha1‘).update(str).digest(‘hex‘);  
}

可以参考博客:http://blog.csdn.net/liangklfang/article/details/51072424

加密

标签:http   fan   ref   detail   targe   span   加密   creat   cookie   

原文地址:http://www.cnblogs.com/liuyinlei/p/7623431.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!