diff --git a/index.js b/index.js index 356080c..cc37b41 100644 --- a/index.js +++ b/index.js @@ -5,10 +5,10 @@ import session from 'express-session' import sessionDb from 'express-session-nedb' import random from 'string-random' import formidable from 'formidable' -import md5 from 'md5-node' +import crypto from 'crypto' import HUB from './fmhub.js' - +const md5 = (str) => crypto.createHash('md5').update(str).digest('hex') const databases = new Map() // 所有数据库 const FM = new HUB() // 频道消息分发器 const messagelist = new Map() // 消息队列的nedb存储 diff --git a/package.json b/package.json index ed308a6..02c5a56 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,6 @@ "formidable": "^2.0.1", "interrelated": "^2.0.0-0", "level": "^7.0.1", - "md5": "^2.3.0", - "md5-node": "^1.0.1", "nedb": "^1.8.0", "string-random": "^0.1.3" },