diff --git a/index.js b/index.js index a63218b..98e15ee 100644 --- a/index.js +++ b/index.js @@ -211,7 +211,7 @@ exports.encrypt = function(publicKeyTo, msg, opts) { // There is a very unlikely possibility that it is not a valid key while(!isValidPrivateKey(ephemPrivateKey)) { - ephemPrivateKey = opts.ephemPrivateKey || crypto.randomBytes(32); + ephemPrivateKey = crypto.randomBytes(32); } ephemPublicKey = getPublic(ephemPrivateKey); resolve(derive(ephemPrivateKey, publicKeyTo));