Commit d7031c8a authored by 余强's avatar 余强
Browse files

fix: 暂时删除cryptoRandomInt导出(后端会奔溃)

Showing with 9 additions and 9 deletions
+9 -9
......@@ -121,15 +121,15 @@ export const randomInt = (v1: number, v2: number): number => {
* @example
*
*/
export const cryptoRandomInt = (): number => {
if (crypto) {
crypto.getRandomValues(cryptoCache);
// export const cryptoRandomInt = (): number => {
// if (crypto) {
// crypto.getRandomValues(cryptoCache);
return cryptoCache[0];
} else {
return Math.floor(Math.random() * 0xffffffff);
}
};
// return cryptoCache[0];
// } else {
// return Math.floor(Math.random() * 0xffffffff);
// }
// };
/**
* @description 获得一组安全的随机32位整数
......@@ -322,4 +322,4 @@ export const equal = (num1: number, num2: number) => {
const facCache = [0, 1, 2];
// 单个安全的随机32位整数的计算缓冲
const cryptoCache = new Uint32Array(1);
// const cryptoCache = new Uint32Array(1);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment