EAL4:weak random number generator 补充修复

This commit is contained in:
wangwenrui
2020-12-23 16:41:04 +08:00
parent d0b966013b
commit 7048c2bc87
10 changed files with 12 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ export function resetZIndex(e){
}
export function getUUID(){
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());