feat: replace lib multihashing with multihashing-async

This commit is contained in:
nikuda
2016-10-03 23:15:21 +11:00
committed by Friedel Ziegelmayer
parent cecadba14d
commit b088bab80f
21 changed files with 452 additions and 31388 deletions

View File

@ -11,9 +11,13 @@ const curves = ['P-256', 'P-384', 'P-521']
curves.forEach((curve) => {
suite.add(`ephemeral key with secrect ${curve}`, (d) => {
crypto.generateEphemeralKeyPair('P-256', (err, res) => {
if (err) throw err
if (err) {
throw err
}
res.genSharedKey(res.key, (err, secret) => {
if (err) throw err
if (err) {
throw err
}
secrets.push(secret)
d.resolve()
@ -25,9 +29,9 @@ curves.forEach((curve) => {
})
suite
.on('cycle', (event) => {
console.log(String(event.target))
})
.run({
'async': true
})
.on('cycle', (event) => {
console.log(String(event.target))
})
.run({
'async': true
})