From 54e1ce3c43ce2bd3e7b55981c3dcd7d494be66cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sun, 1 Jul 2018 23:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96uuid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 6b0c9c4..5b2aa49 100644 --- a/index.js +++ b/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 }, /** diff --git a/package.json b/package.json index 6f29274..1f98a8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crypto.js", - "version": "1.1.0", + "version": "1.1.1", "description": "原生crypto加密模块的二次封装,简化常用加密函数的使用", "keywords": [ "md5",