mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
use uuid in keygen, remove storage.key from note hash
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
const crypto = require('crypto')
|
||||
const _ = require('lodash')
|
||||
const uuidv4 = require('uuid/v4')
|
||||
|
||||
module.exports = function (length) {
|
||||
if (!_.isFinite(length)) length = 10
|
||||
return crypto.randomBytes(length).toString('hex')
|
||||
module.exports = function () {
|
||||
return uuidv4()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user