15

php随机函数mt_rand()产生的小问题大漏洞-菜鹅小生

 5 years ago
source link: http://blog.51cto.com/12332766/2320416
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
**说到随机函数的应用,作为一个菜鸟,理解的也不是很深刻,在这里之作为一个笔记来记录,以后慢慢将其掌握之后,再在内容上面进行加深。随机函数的作用,常常是用来生成验证码、随机文件名、订单号,如果用来做安全验证的话常常用来生成加密key、token等等。**一、常见的随机函数1、rand()常用的随机函数,默认生成0-getrandmax()之间的随机数,不过因为性能问题,已经被mt_rand()函数

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK