优化uuid
parent
116c3315df
commit
54e1ce3c43
4
index.js
4
index.js
|
@ -99,8 +99,8 @@ module.exports = {
|
|||
let rand = CRYPTO.randomBytes(8).toString('hex')
|
||||
let stamp = ((Date.now() / 1000) >>> 0).toString(16)
|
||||
|
||||
rand = rand.replace(/^([0-9a-z]{8})([0-9a-z]{4})([0-9a-z]{4})$/, '$1-$2-$3')
|
||||
return rand + '-' + stamp
|
||||
rand = rand.replace(/^([0-9a-z]{4})([0-9a-z]{4})([0-9a-z]{8})$/, '$1-$2-$3')
|
||||
return stam + '-' + prand
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "crypto.js",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "原生crypto加密模块的二次封装,简化常用加密函数的使用",
|
||||
"keywords": [
|
||||
"md5",
|
||||
|
|
Loading…
Reference in New Issue