Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
keys.generateKeyPair(options.algo, options.bits, (err, key) => {
if (err) { return reject(err) }
resolve({
'public': keys.marshalPublicKey(key.public),
'private': keys.marshalPrivateKey(key)
})
})
})
keys.generateKeyPair(options.algo, options.bits, (err, key) => {
if (err) { return reject(err) }
resolve({
read: encode(keys.marshalPublicKey(key.public)),
write: encode(keys.marshalPrivateKey(key))
})
})
})