git リポジトリhttps://github.com/thejh/node-curve25519のクローンを作成し、次にnpm link
その中で使用しました。このライブラリを推奨される方法で使用しています: var curve = require('curve25519');
. curve.makeSecretKey()
しかし、このフラグメントの行でこのエラーが発生しています:
temp.secret = crypto.randomBytes(32);
curve.makeSecretKey(temp.secret);
これはエラー メッセージです。
/Users/username/Workspaces/nodejs/myproject/server.js:59
curve.makeSecretKey(ctx.private);
^
TypeError: Object #<Object> has no method 'makeSecretKey'
at handlers.(anonymous function) (/Users/username/Workspaces/nodejs/myprojet/server.js:59:8)
at Socket.<anonymous> (/Users/username/Workspaces/nodejs/myproject/server.js:198:3)
at Socket.EventEmitter.emit (events.js:98:17)
at UDP.onMessage (dgram.js:440:8)
私は何を間違っていますか?このライブラリには、そのようなメソッドが含まれている必要があります。ご覧のとおり: https://github.com/thejh/node-curve25519/blob/master/index.js