curve25519-n
Advanced tools
Comparing version 1.2.0 to 1.4.0
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.2.0", | ||
"version": "1.4.0", | ||
"main": "index.js", | ||
@@ -37,6 +37,9 @@ "scripts": { | ||
"license": "ISC", | ||
"engines": { | ||
"node": ">=4.8.0" | ||
}, | ||
"dependencies": { | ||
"nan": "^2.8.0", | ||
"nan": "^2.10.0", | ||
"bindings": "~1.3.0" | ||
} | ||
} |
@@ -0,2 +1,8 @@ | ||
node-curve25519 | ||
=============== | ||
[![npm version](https://badge.fury.io/js/curve25519-n.svg)](https://badge.fury.io/js/curve25519-n) | ||
[![Build Status](https://travis-ci.org/volschin/node-curve25519.svg?branch=master)](https://travis-ci.org/volschin/node-curve25519) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/ge3jjijetqp2lf4h?svg=true)](https://ci.appveyor.com/project/volschin/node-curve25519) | ||
[![Known Vulnerabilities](https://snyk.io/test/npm/curve25519-n/badge.svg)](https://snyk.io/test/npm/curve25519-n) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/volschin/node-curve25519.svg)](https://greenkeeper.io/) | ||
@@ -9,2 +15,3 @@ This is a binding to the curve25519-donna library for node. Usage: | ||
======= | ||
`curve.makeSecretKey(secret)` | ||
@@ -11,0 +18,0 @@ ----------------------------- |
16
test.js
var curve = require("bindings")("curve"); | ||
var buf1 = new Buffer(64); | ||
var buf2 = new Buffer(64); | ||
var buf3 = new Buffer(64); | ||
var buf1 = new Buffer.alloc(32); | ||
var secretKeyAlice = new Buffer.from('77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a', 'hex'); | ||
var expectedPublicKeyBob = new Buffer.from('de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f', 'hex'); | ||
console.log(buf1.toString('base64')); | ||
curve.curve(buf1,buf2,buf3); | ||
console.log(buf1.toString('base64')); | ||
curve.curve(buf1,secretKeyAlice,expectedPublicKeyBob); | ||
console.log(buf1.toString('hex')); | ||
if (buf1.toString('base64') == 'TX5zmcW3e8VSzbjMoMQJqdY2ASjiOQIJJ92nDaq9QHU=') { | ||
console.log('Result matches - OK!'); | ||
} else { | ||
console.log('Result doesnt match - FALSE!'); | ||
return (false); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26195
13
56
31
Updatednan@^2.10.0