mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-19 17:44:44 +00:00
Use npm for getting packages.
This commit is contained in:
parent
0e9020ee1f
commit
f5db077355
2 changed files with 12 additions and 12 deletions
|
|
@ -1,15 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
const crypto = require('crypto');
|
||||
const util = require('util');
|
||||
|
||||
const newMethod = async (...args) => new Promise((resolve) => crypto.hkdf(...args, resolve));
|
||||
|
||||
/**
|
||||
* Promisified version of Node.js's crypto.hkdf.
|
||||
*/
|
||||
exports.hkdf = util.promisify(crypto.hkdf);
|
||||
exports.hkdf = newMethod;
|
||||
|
||||
const newMethod2 = async (...args) => new Promise((resolve) => crypto.randomBytes(...args,
|
||||
resolve));
|
||||
|
||||
/**
|
||||
* Promisified version of Node.js's crypto.randomBytes
|
||||
*/
|
||||
exports.randomBytes = util.promisify(crypto.randomBytes);
|
||||
exports.randomBytes = newMethod2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue