libsodium-neon
Advanced tools
Comparing version 2.0.1 to 2.0.3
@@ -24,3 +24,3 @@ /* | ||
var objToBuffer = function(obj) { | ||
var obj_to_buffer = function (obj) { | ||
if (typeof Buffer.from === 'function') { | ||
@@ -35,5 +35,5 @@ return new Uint8Array(Buffer.from(obj)); | ||
crypto_auth_BYTES: 32, | ||
crypto_auth_hmacsha256: function(message, key) { | ||
message = objToBuffer(message); | ||
key = objToBuffer(key); | ||
crypto_auth_hmacsha256: function (message, key) { | ||
message = obj_to_buffer(message); | ||
key = obj_to_buffer(key); | ||
@@ -46,7 +46,7 @@ return new Uint8Array(sodiumneon.crypto_auth_hmacsha256(message, key)); | ||
crypto_hash_BYTES: 64, | ||
crypto_scalarmult (secretKey, publicKey) { | ||
secretKey = objToBuffer(secretKey); | ||
publicKey = objToBuffer(publicKey); | ||
crypto_scalarmult (secret_key, public_key) { | ||
secret_key = obj_to_buffer(secret_key); | ||
public_key = obj_to_buffer(public_key); | ||
return new Uint8Array(sodiumneon.crypto_scalarmult(secretKey, publicKey)); | ||
return new Uint8Array(sodiumneon.crypto_scalarmult(secret_key, public_key)); | ||
}, | ||
@@ -56,25 +56,25 @@ crypto_scalarmult_BYTES: 32, | ||
crypto_sign_BYTES: 64, | ||
crypto_sign_detached: function(message, secretKey) { | ||
message = objToBuffer(message); | ||
secretKey = objToBuffer(secretKey); | ||
crypto_sign_detached: function (message, secret_key) { | ||
message = obj_to_buffer(message); | ||
secret_key = obj_to_buffer(secret_key); | ||
return new Uint8Array(sodiumneon.crypto_sign_detached(message, secretKey)); | ||
return new Uint8Array(sodiumneon.crypto_sign_detached(message, secret_key)); | ||
}, | ||
crypto_sign_ed25519_pk_to_curve25519: function(publicKey) { | ||
publicKey = objToBuffer(publicKey); | ||
crypto_sign_ed25519_pk_to_curve25519: function (public_key) { | ||
public_key = obj_to_buffer(public_key); | ||
return new Uint8Array(sodiumneon.crypto_sign_ed25519_pk_to_curve25519(publicKey)); | ||
return new Uint8Array(sodiumneon.crypto_sign_ed25519_pk_to_curve25519(public_key)); | ||
}, | ||
crypto_sign_ed25519_sk_to_curve25519: function(secretKey) { | ||
secretKey = objToBuffer(secretKey); | ||
crypto_sign_ed25519_sk_to_curve25519: function (secret_key) { | ||
secret_key = obj_to_buffer(secret_key); | ||
return new Uint8Array(sodiumneon.crypto_sign_ed25519_sk_to_curve25519(secretKey)); | ||
return new Uint8Array(sodiumneon.crypto_sign_ed25519_sk_to_curve25519(secret_key)); | ||
}, | ||
crypto_sign_keypair: function() { | ||
var keyPair = sodiumneon.crypto_sign_keypair(); | ||
crypto_sign_keypair: function () { | ||
var key_pair = sodiumneon.crypto_sign_keypair(); | ||
return { | ||
publicKey: new Uint8Array(keyPair.publicKeyBuffer), | ||
privateKey: new Uint8Array(keyPair.privateKeyBuffer), | ||
keyType: keyPair.keyType | ||
publicKey: new Uint8Array(key_pair.public_key_buffer), | ||
privateKey: new Uint8Array(key_pair.private_key_buffer), | ||
keyType: key_pair.key_type, | ||
}; | ||
@@ -85,9 +85,9 @@ }, | ||
crypto_sign_SEEDBYTES: 32, | ||
crypto_sign_verify_detached: function(signature, message, publicKey) { | ||
signature = objToBuffer(signature); | ||
message = objToBuffer(message); | ||
publicKey = objToBuffer(publicKey); | ||
crypto_sign_verify_detached: function (signature, message, public_key) { | ||
signature = obj_to_buffer(signature); | ||
message = obj_to_buffer(message); | ||
public_key = obj_to_buffer(public_key); | ||
return sodiumneon.crypto_sign_verify_detached(signature, message, publicKey); | ||
} | ||
return sodiumneon.crypto_sign_verify_detached(signature, message, public_key); | ||
}, | ||
}; |
{ | ||
"dependencies": { | ||
"neon-cli": "0.1.13" | ||
}, | ||
"description": "Node.js bindings to sodiumoxide.", | ||
"devDependencies": { | ||
"eslint": "3.17.1", | ||
"jasmine": "2.5.3", | ||
"libsodium-wrappers-sumo": "0.4.9", | ||
"neon-cli": "0.1.13" | ||
"libsodium-wrappers-sumo": "0.4.9" | ||
}, | ||
"description": "Node.js bindings to sodiumoxide.", | ||
"license": "GPL-3.0", | ||
"main": "lib/index.js", | ||
"name": "libsodium-neon", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wireapp/libsodium-neon.git" | ||
}, | ||
"scripts": { | ||
"build": "neon build", | ||
"lint": "eslint .", | ||
"postinstall": "npm run build", | ||
"test": "jasmine test" | ||
}, | ||
"version": "2.0.1" | ||
"version": "2.0.3" | ||
} |
@@ -25,3 +25,3 @@ /* | ||
key_material: new Uint8Array([5, 30, 208, 218, 140, 173, 89, 133, 238, 120, 243, 172, 56, 0, 84, 80, 225, 83, 110, 68, 59, 136, 105, 202, 200, 243, 73, 174, 28, 38, 66, 246]), | ||
assert_is_not_zeros: function(array) { | ||
assert_is_not_zeros: function (array) { | ||
var only_zeroes = true; | ||
@@ -35,3 +35,3 @@ for (var index = 0; index < array.length; ++index) { | ||
return (only_zeroes === false); | ||
} | ||
}, | ||
}; |
@@ -28,4 +28,4 @@ /* | ||
describe('libsodium-neon', function() { | ||
it('assert_is_not_zeros', function() { | ||
describe('libsodium-neon', function () { | ||
it('assert_is_not_zeros', function () { | ||
expect(helpers.assert_is_not_zeros([0, 0, 0, 0, 0])).toBe(false); | ||
@@ -37,3 +37,3 @@ expect(helpers.assert_is_not_zeros([0, 0, 0, 230, 0])).toBe(true); | ||
it('crypto_sign_keypair', function() { | ||
it('crypto_sign_keypair', function () { | ||
keypair_alice = libsodium.crypto_sign_keypair(); | ||
@@ -45,4 +45,4 @@ expect(helpers.assert_is_not_zeros(keypair_alice.publicKey)).toBe(true); | ||
describe('Compliance', function() { | ||
it('crypto_sign_keypair', function() { | ||
describe('Compliance', function () { | ||
it('crypto_sign_keypair', function () { | ||
keypair_alice = libsodium.crypto_sign_keypair(); | ||
@@ -56,3 +56,3 @@ keypair_bob = libsodium_neon.crypto_sign_keypair(); | ||
it('crypto_auth_hmacsha256', function() { | ||
it('crypto_auth_hmacsha256', function () { | ||
var auth = libsodium.crypto_auth_hmacsha256(helpers.message, helpers.key_material); | ||
@@ -63,3 +63,3 @@ var authNeon = libsodium_neon.crypto_auth_hmacsha256(helpers.message, helpers.key_material); | ||
it('crypto_sign_detached', function() { | ||
it('crypto_sign_detached', function () { | ||
var sign = libsodium.crypto_sign_detached(helpers.message, keypair_alice.privateKey); | ||
@@ -70,3 +70,3 @@ var signNeon = libsodium_neon.crypto_sign_detached(helpers.message, keypair_alice.privateKey); | ||
it('crypto_sign_ed25519_sk_to_curve25519', function() { | ||
it('crypto_sign_ed25519_sk_to_curve25519', function () { | ||
curve25519_secret_key_alice = libsodium.crypto_sign_ed25519_sk_to_curve25519(keypair_alice.privateKey); | ||
@@ -81,3 +81,3 @@ var curve25519_secret_key_alice_neon = libsodium.crypto_sign_ed25519_sk_to_curve25519(keypair_alice.privateKey); | ||
it('crypto_sign_ed25519_pk_to_curve25519', function() { | ||
it('crypto_sign_ed25519_pk_to_curve25519', function () { | ||
var curve25519_public_key_alice = libsodium.crypto_sign_ed25519_pk_to_curve25519(keypair_alice.publicKey); | ||
@@ -93,3 +93,3 @@ var curve25519_public_key_alice_neon = libsodium.crypto_sign_ed25519_pk_to_curve25519(keypair_alice.publicKey); | ||
it('crypto_scalarmult', function() { | ||
it('crypto_scalarmult', function () { | ||
var scalar = libsodium.crypto_scalarmult(curve25519_secret_key_alice, curve25519_public_key_bob); | ||
@@ -96,0 +96,0 @@ var scalar_neon = libsodium_neon.crypto_scalarmult(curve25519_secret_key_alice, curve25519_public_key_bob); |
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
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
62110
21
0
0
1
+ Addedneon-cli@0.1.13
+ Addedansi-escapes@1.4.0(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuiltins@0.0.7(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcli-cursor@1.0.2(transitive)
+ Addedcli-width@1.1.1(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexit-hook@1.1.1(transitive)
+ Addedfigures@1.7.0(transitive)
+ Addedfs-extra@0.26.7(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedgit-config@0.0.7(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhandlebars@4.7.8(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedin-publish@2.0.1(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addediniparser@1.0.5(transitive)
+ Addedinquirer@0.11.4(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedjsonfile@2.4.0(transitive)
+ Addedklaw@1.3.1(transitive)
+ Addedlodash@3.10.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmute-stream@0.0.5(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addedneon-cli@0.1.13(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedonetime@1.1.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedreadline2@1.0.1(transitive)
+ Addedrestore-cursor@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedrsvp@3.6.2(transitive)
+ Addedrun-async@0.1.0(transitive)
+ Addedrx-lite@3.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedshallow-copy@0.0.1(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.17(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtoml@2.3.6(transitive)
+ Addeduglify-js@3.17.4(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedvalidate-npm-package-name@2.2.2(transitive)
+ Addedwordwrap@1.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)