1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00
Files
Boostnote/browser/lib/keygen.js
2016-08-27 12:23:58 +09:00

8 lines
192 B
JavaScript

const crypto = require('crypto')
const _ = require('lodash')
module.exports = function (length) {
if (!_.isFinite(length)) length = 10
return crypto.randomBytes(length).toString('hex')
}