mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-02 18:51:29 +00:00
12 lines
316 B
JavaScript
12 lines
316 B
JavaScript
'use strict'
|
|
|
|
const ecdh = require('./ecdh')
|
|
|
|
// Generates an ephemeral public key and returns a function that will compute
|
|
// the shared secret key.
|
|
//
|
|
// Focuses only on ECDH now, but can be made more general in the future.
|
|
module.exports = (curve, callback) => {
|
|
ecdh.generateEphmeralKeyPair(curve, callback)
|
|
}
|