mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-24 08:01:50 +00:00
feat: replace lib multihashing with multihashing-async
This commit is contained in:
committed by
Friedel Ziegelmayer
parent
cecadba14d
commit
b088bab80f
@ -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
|
||||
})
|
||||
|
Reference in New Issue
Block a user