Ruby's Louvre

每天学习一点点算法

导航

2013年12月7日 #

通过window.crypto.getRandomValues获得一个大于零的随机数

摘要: window.crypto.getRandomValues(new Uint32Array(1))[0];浏览器支持情况如下:IE: noIE Mobile: noFirefox24+Firefox Mobile: will be in 21Safari: from 3.1Safari Mobile: from iOS 6Chrome: from 11Chrome for Mobile: from 23Android browser (before 4.0 as replaced with Chrome): noOpera: no (though will probably get it wh 阅读全文

posted @ 2013-12-07 09:46 司徒正美 阅读(6327) 评论(0) 推荐(0)